Query count fix
Merge pull request #322 from jovanchohan/query_count

Query count fix