Index: ezp4/trunk/extension/ezfind/classes/ezfindelevateconfiguration.php
===================================================================
--- ezp4/trunk/extension/ezfind/classes/ezfindelevateconfiguration.php	(revision 4583)
+++ ezp4/trunk/extension/ezfind/classes/ezfindelevateconfiguration.php	(working copy)
@@ -246,6 +246,7 @@
 
         $fieldFilters = $custom = null;
         $objects = array();
+        $conds = array();
         $sortClause = $groupByLanguage ? array( 'language_code' => 'asc' ) : null;
 
         if ( !is_array( $queryString ) )
@@ -260,23 +261,13 @@
         if ( $languageCode and $languageCode !== '' )
             $conds['language_code'] = array( array( $languageCode, self::WILDCARD ) );
 
-
         if ( $countOnly )
         {
-            $limit = null;
-            $fieldFilters = array();
-            $custom = array( array( 'operation' => 'count( * )',
-                                    'name' => 'count' ) );
-        }
-
-        $rows = parent::fetchObjectList( self::definition(), $fieldFilters, $conds, $sortClause, $limit, false, false, $custom );
-
-        if ( $countOnly and $rows )
-        {
-            return $rows[0]['count'];
+            return parent::count( self::definition(), $conds );
         }
         else
         {
+            $rows = parent::fetchObjectList( self::definition(), $fieldFilters, $conds, $sortClause, $limit, false, false, $custom );
             foreach( $rows as $row )
             {
                 if ( ( $obj = eZContentObject::fetch( $row['contentobject_id'] ) ) !== null )
Index: ezp4/trunk/extension/ezfind/classes/ezfmodulefunctioncollection.php
===================================================================
--- ezp4/trunk/extension/ezfind/classes/ezfmodulefunctioncollection.php	(revision 4583)
+++ ezp4/trunk/extension/ezfind/classes/ezfmodulefunctioncollection.php	(working copy)
@@ -212,26 +212,26 @@
         }
         else
         {
-            if ( $countOnly )
-            {
-                $limit = null;
-                $fieldFilters = array();
-                $custom = array( array( 'operation' => 'count( * )',
-                                        'name' => 'count' ) );
-            }
-
             if ( $languageCode )
                 $conds = array( 'language_code' => $languageCode );
 
-            $sorts = array( 'search_query' => 'asc' );
-            $results = eZPersistentObject::fetchObjectList( eZFindElevateConfiguration::definition(),
-                                                            $fieldFilters,
-                                                            $conds,
-                                                            $sorts,
-                                                            $limit,
-                                                            false,
-                                                            false,
-                                                            $custom );
+            if ( $countOnly )
+            {
+                $results = eZPersistentObject::count( eZFindElevateConfiguration::definition(),
+                                                                $conds );
+            }
+            else
+            {
+                $sorts = array( 'search_query' => 'asc' );
+                $results = eZPersistentObject::fetchObjectList( eZFindElevateConfiguration::definition(),
+                                                                $fieldFilters,
+                                                                $conds,
+                                                                $sorts,
+                                                                $limit,
+                                                                false,
+                                                                false,
+                                                                $custom );
+            }
         }
         // END polymorphic part
 
@@ -243,9 +243,6 @@
         }
         else
         {
-            if ( $searchQuery === null and $countOnly )
-                return array( 'result' => $results[0]['count'] );
-
             return array( 'result' => $results );
         }
     }
