Allow count to work with query hints

JAVA-1344