MongoDB aggregation query that experiences a significant increase in execution time when adding $count or $group stages

@Peter_Hubbard Hello

Yes I am sure that without $count stage query is taking below 500ms and after adding it, goes to 15 to 20 seconds.