Filter by attribute (advanced search)

Permalink
I have a advanced search form build by the IndexedPageList. Normally it shows all results with only the CollectionTypeHandle("material") as filter. In my example the total number of results is 6. My problem is when i'm applying other filters to the IndexedPageList like custom attributes the total amount gets for example 2. At this point i want to know also the total amount of results (6). Is there an easy way to do this? Thanks.

public function do_search() {
      $q = $_REQUEST['query'];
      // i have NO idea why we added this in rev 2000. I think I was being stupid. - andrew
      // $_q = trim(preg_replace('/[^A-Za-z0-9\s\']/i', ' ', $_REQUEST['query']));
      $_q = $q;
      Loader::library('database_indexed_search');
      $ipl = new IndexedPageList();
      $aksearch = false;
      if (is_array($_REQUEST['akID'])) {
         Loader::model('attribute/categories/collection');
         foreach($_REQUEST['akID'] as $akID => $req) {
            $fak = CollectionAttributeKey::getByID($akID);
            if (is_object($fak)) {
               $type = $fak->getAttributeType();
               $cnt = $type->getController();

brianvandelden