List of disctinct values for a FIELD in COLLECTION:
db.COLLECTION.distinct("FIELDNAME", {})
Count of the same:
db.COLLECTION.distinct("FIELDNAME", {}).length
List of disctinct values for a FIELD in COLLECTION:
db.COLLECTION.distinct("FIELDNAME", {})
Count of the same:
db.COLLECTION.distinct("FIELDNAME", {}).length