Single row query for fetching results of SELECT COUNT(1) and similar.
Refactoring.