Since spanish is my mother’s tongue probably I got lost in translation:
“How many documents contain at least one score in the results array that is greater than or equal to 70 and less than 80?”*
*“At least one score” … meaning one, two or three out of them, no matter their position into the array has to complay with the "greater than or equal to 70 and less than 80" demand… so when I try no solved this at first I try this:
db.scores.find({“results”: {$gte: 70, $lt: 80}}).count()
1020
Then I try this one:
db.scores.find({“results”: {$elemMatch: {$gte: 70, $lt: 80}}}).count()
744
But looking at the results I realized that each of the score comply with the "greater than or equal to 70 and less than 80"
So just to make clear and to be sure that I understood the $elemMatch: command would you please clarify this issue to me