Du kan afvikle det indlejrede dokument og derefter matche status og derefter bruge gruppe ved at tælle alle dokumenterne.
db.collection.aggregate([
{ "$unwind": "$chat"},
{$match:{"chat.status": "pending"}},
{ "$group":{"_id":null, count: {$sum:1}}}
])
ELLER
Hent alle dokumenter forenklet og tæl længden af arrayet
db.collection.aggregate([
{ "$unwind": "$chat"},
{$match:{"chat.status": "pending"}},
])