Hi,
CountDocuments does not require a hint, but one can be provided as an option. The StackOverflow post you linked is related to ticket
https://jira.mongodb.org/browse/GODRIVER-1156, which was closed due to inactivity. We were unable to reproduce any errors when using the SetHint option (I tested this on version 1.0.1 as was reported by the original user and also 1.1.3, which is the latest driver version).
If you want to provide a hint, it can either be the name of an index or a document describing the index specification. For example, a hint on an index for fields (name, age) could be given as "name_1_age_1" or bson.D{{"name", 1}, {"age", 1}}. This is assuming a custom name wasn't provided when creating the index so the default naming convention was used.