Accounting for count queries