Get proper query counts