Get position of object after sort in MongoDB
<p>I developing a web application and I'm using MongoDB to store data. I am able to sort the data and display it properly, but I want to get the position of the object after sorting it with Mongo. So far I have this code:</p>

<p><code>Websites.find({_id: {$lte: website_id}}, {sort:{upvotes: -1}}).count();</code></p>

<p>It doesn't quite work. It returns sort of position but not related to the <code>sort:{upvotes: -1}</code>. </p>

<p>So, the question is, how can I return <code>1</code> to the most upvoted, <code>2</code> to the second, and so on?</p>