Some help with atlas search pipeline please

I want to count the number of documents/results of the previous stage of the pipeline. This is an excercise about atlas search (Mongo db university).

I am supposed to use the $count operator for the second stage, for counting the number of documents , but no matter what I have tried, I have failed.

You may see the photo I have uploaded, I have used the line: {$count : “results” } , but i receive an error, the count field must be a non-empty string.

Can anyone please! tell me what am I doing wrong.

Take a look at the hint:

And take a look at the solution for anyone who may stumble upon my struggles:
Just delete my line , and replace simply with: “ANYSTRINGNAME”
Problem solved.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.