Database
[{"collection":"contacts","count":100,"content":{"_id":{"type":"autoincrement","autoType":"int","startInt":0},"activities":{"type":"array","minLength":0,"maxLength":10,"arrayContent":{"type":"object","objectContent":{"types":{"type":"enum","values":["postcards","letter","phone call","SMS","email"],"randomOrder":true}}}}}}]
Query
db.contacts.aggregate([{"$match":{"activities.types":"postcards"}},{"$project":{"_id":0,"postcardsCount":{"$reduce":{"input":"$activities","initialValue":0,"in":{"$cond":[{"$eq":["$$this.types","postcards"]},{"$add":["$$value",1]},"$$value"]}}}}},{"$match":{"$expr":{"$gt":["$postcardsCount",1]}}},{"$count":"totalCount"}])