Port DBCollection changes to allow hint to work with count

JAVA-1344