Fixed query counter