title: Mongo Sort by Count of Matches in Array
body: <p>Lets say my test data is</p>
  
  <pre><code>db.multiArr.insert({"ID" : "fruit1","Keys" : ["apple", "orange", "banana"]})
  db.multiArr.insert({"ID" : "fruit2","Keys" : ["apple", "carrot", "banana"]})
  </code></pre>
  
  <p>to get individual fruit like carrot i do</p>
  
  <pre><code>db.multiArr.find({'Keys':{$in:['carrot']}})
  </code></pre>
  
  <p>when i do an or query for orange and banana, i see both the records fruit1 and then fruit2</p>
  
  <pre><code>db.multiArr.find({ $or: [{'Keys':{$in:['carrot']}}, {'Keys':{$in:['banana']}}]})
  </code></pre>
  
  <p>Result of the output should be fruit2 and then fruit1, because fruit2 has both carrot and banana</p>