Database
[{"_id":"3233123123213123123","sequence":30,"containIds":["fgx"]},{"_id":"534545345345345345","sequence":70,"containIds":["abc","fgx"]},{"_id":"56756676767676767","sequence":160,"containIds":[]}]
Query
db.collection.aggregate([{$facet:{first:[{$match:{"containIds":{$in:["fgx","containIds"]}}},{$count:"count"}],second:[{$match:{sequence:{$gt:0,$lt:99}}},{$count:"count"}]}}])