Count query test