DATAES-115 Add count before projection query to retrieve all results.

If there're missing things, please let me know.