title: Counting the number of rows having values greater than particular row after grouping in a dataframe
body: <p>I have a dataframe containing the population of important cities. <a href="https://i.stack.imgur.com/jSmuP.png" rel="nofollow noreferrer">Dataframe image</a></p>
  <p>It contains cities from different countries. out of all cities in a particular country there is only one city which is consiedered as primary(mentioned in the column 'capital').I need to find out the number of cities which is having population greater than that of the primary city.Kindly provide one solution?</p>