Write a test for getting the query counter