It is time we discuss some useful utility stages, what we call cursor-like stages. These stages are sort, skip, limit, and count. And they have an equivalence in our query language as a cursor method. Let's have a look. After connecting to my aggregations database, I can express the simple query on the solar system where I'm going to find all my documents, this is a full collection scan, and only projecting out the name, number of moons, and keeping out the _id. If I do this, I can see all the results of my collection only exposing the name, number of moons per each one of the documents. Sweet. This works well. The other thing I can do is basically call count. Now, this will count the full amount of documents returned by the query. Here, I can see that I have on my solar system, nine documents. Another thing that I can do is basically skip five documents, and if I execute this query, I can see that I skipped a few first documents. Now, if you are wondering why did I get this order and why did I skip those previous five documents and not others, if I do not specify a sorting operation or a sorting of my cursor, I will get from MongoDB, the order by which the documents are inserted in the collection, what we call the natural order of the collection. So in this case, I'm going to skip the five first elements that have been inserted into this collection. The following method will be limit where I can specify the number of documents that I'm going to return. And again, following the exact same sorting order, which in this case is going to be my natural insert sorting order on our solar system collection, I'll get the Sun, Mercury, Venus, Earth and Mars which are the five first documents of my collection. And lastly, I can also specify a sort for the result set of my collection. Here, I'm going to find everything but instead of giving back the order by which documents are inserted in the collection, I'm going to sort the results set based on the number of moons that each one of these documents contain. Minus one specifies the order, and in this case, it will be descending. So as we can see, we are going to get first the ones that have more moons to the ones that have less moons. Now, we've seen the cursor methods, but we also have stages that execute exactly the same kind of functionality. We have $limit, skip, $count, and $sort. They will vary a little bit on the syntax where our limit will take an integer, skip will take also an integer specifying the number of limit documents and the number of skipped documents. Count, on the other hand, we will need to specify a field where we want to collect the count value, and sort, we need to specify the keys and the order by which we want our result sets of the pipeline to be sorted. Let's see some of this in action. Now to mimic exactly the same operation as before our find command, I'm going to execute the project of name and number of moons excluding _id, exactly the same operation as before. And in this case, given the pipeline that I'm executing and giving the documents that this aggregation pipeline will provide, I will add a limit stage to my pipe saying I only want the first five documents coming from this project stage. And as expected, I get the same results as I would if I would limit on a find operation. The following stage will be skip, and again, giving the results incoming from the project stage, I will skip only one. In this case, I'm going to skip the sun. So how do I know that I'm going to skip sun? Well basically, the order by which I'm going to get the results into the project is the natural order exactly in the same way as we've seen before. The project will filter out only the fields that I'm interested on and pass along that to this skip stage. Skip by skipping up one, I'm going to be skipping the sun. As you can see here, all different celestial bodies will be reported back in my results except for the sun which is the first element, the one that I'm skipping in the pipeline.