Write tests for query with count and bind vars.