Adds a simple way to count queries over a piece of code
Merge pull request #6239 from mrclay/query_counter

Adds a simple way to count queries over a piece of code