check the query before incrementing the apiUseCount