I want to count specific objects if present in collections like:
{
id: 1,
obj1: {...},
obj2: {...}
},{
id: 2,
obj2: {...}
},{
id: 3,
obj1: {...},
obj3: {...}
}
In above example i need the sum of count of objects(i.e. obj1, obj2, obj3). And query should return 5 in above scenario.