bson: add bson_count()

Counts the number of fields found in the BSON document.