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.