title: How to sort by count on Mongodb
body: <p>I am doing a group-by operation, counting the number of entries on each group. Here is the code:</p>
  
  <pre><code>db.feeds.group({key:{link:1, 'subtitle_detail.base':1}, reduce:function(curr,result){
          result.count++
      },
      initial: {count: 0}
      })
  </code></pre>
  
  <p>This code returns an array. how do I modify the code so that the array is sorted in descending order, by count?</p>