diff --git a/eZ/Publish/Core/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/eZ/Publish/Core/Search/Legacy/Content/Gateway/DoctrineDatabase.php
index <HASH>..<HASH> 100644
--- a/eZ/Publish/Core/Search/Legacy/Content/Gateway/DoctrineDatabase.php
+++ b/eZ/Publish/Core/Search/Legacy/Content/Gateway/DoctrineDatabase.php
@@ -85,7 +85,7 @@ class DoctrineDatabase extends Gateway
         $doCount = true
     )
     {
-        $count = $doCount ? $this->getResultCount( $criterion, $sort, $fieldFilters ) : null;
+        $count = $doCount ? $this->getResultCount( $criterion, null, $fieldFilters ) : null;
 
         if ( !$doCount && $limit === 0 )
         {
There is no need for sorting when just getting the result count