title: Get index of sorted duplicate elements in python collection counter
body: <p>I have sorted collection counter and I'm trying to get the index of <code>banana</code> which is 1 because the frequency of <code>cherry</code> and <code>banana</code> are the same, but it gives 2. Or the index of <code>mango</code> must be 2 instead of 3.</p>
  <p><strong>My code:</strong></p>
  <pre class="lang-py prettyprint-override"><code>from collections import Counter
      
  fruits = ['apple','cherry', 'apple','banana','banana','cherry','apple', 'mango']
  fruits_frequency = Counter([item for items, c in Counter(fruits).most_common() for item in [items] * c])
  
  print(fruits_frequency)
  mapping = dict((item[1][0], item[0]) for item in enumerate(fruits_frequency.most_common()))
  
  print(mapping[&quot;banana&quot;])
  </code></pre>
  <p><strong>Output:</strong></p>
  <pre><code>Counter({'apple': 3, 'cherry': 2, 'banana': 2, 'mango': 1})
  2
  </code></pre>