Database
[{user:1,type:0},{user:1,type:1},{user:1,type:1},{user:1,type:0},{user:1,type:0},{user:1,type:1},{user:1,type:1},{user:1,type:0}]
Query
db.collection.aggregate([{$match:{user:1}},{$facet:{type0:[{$match:{type:0}},{$sort:{type:-1}},{$skip:1},{$limit:2}],type1:[{$match:{type:1}},{$sort:{type:-1}},{$skip:1},{$limit:2}],counts:[{$group:{"_id":"$type",cnt:{$sum:1}}},{$project:{type:"$_id",cnt:1,_id:0}}]}}])