Wraps the query in order to accurately count the root objects.
Given a DQL like
SELECT u FROM User u it will generate an SQL
query like: SELECT COUNT(*) (SELECT DISTINCT <id> FROM (<original
Works with composite keys but cannot deal with queries that have multiple
root entities (e.g.
SELECT f, b from Foo, Bar)
Author: Sander Marechal <firstname.lastname@example.org>
Located at Tools/Pagination/CountOutputWalker.php