I wanted to get the exact count of Counties.Properties which is in my case is 3 , I tried $size aggregation but didn't get me the desired answer answer .
{
"_id" : ObjectId("234567890"),
"Version" : "1.1",
"FileNo" : "1234567",
"Feature" : [
"Map",
"usr/ammer"
],
"TVProperties" : [
"foul"
],
"Name" : "nice",
"Countries" : {
"Properties" : [
{
"kyu" : "NAmerica",
"triggerString" : "America",
"user" : "ME"
},
{
"kyu" : "ASIA",
"triggerString" : "China",
"user" : "You"
},
{
"kyu" : "Europe",
"triggerString" : "France",
"user" : "HE"
}
]
},