Quick and dirty patch to avoid the use of Doctrine\ORM\Tools\Pagination\CountOutputWalker when the query to count does not contains a HAVING clause. Instead the Doctrine\ORM\Tools\Pagination\CountWalker is used and produce a query better for performance.