How to access Couchbase ViewResults in golang?

The reason it’s hidden is that the count there is the count of everything in the view-- not just the items that matched the query. We know what’s not what people expect it to mean, so we don’t usually expose it That’s what the server returns to the client.

Since the server doesn’t return the count, if the SDK were to do it for you it’d be approximately the same as counting the results in your code. It’s a bit more work, but there’s no performance advantage.

This does come up often enough that I’ve filed an RFE to add the count of the results. You can track it in the issue tracker if you’d like.