Database

[{tags:["video","Alex"]},{tags:["video","John"]},{tags:["video","John"]},{tags:["text","Alex"]},{tags:["text","John"]}]

Query

db.collection.aggregate([{$match:{"tags":"video"}},{$group:{_id:{tags:"$tags"},total:{$sum:1}}}])

Result