title: Counting elements in list
body: <p>Let's say I have a list of customer IDs and a category of item that he buys:</p>
  
  <p>[ [ID0 , 0], [ID1, 1], ... ]</p>
  
  <p>A customer can appear more than once, and it is also possible that he buys the same type of item more than once.</p>
  
  <p>For example, it is possible that we have [ID0, 1], [ID0, 2], [ID0, 1], [ID1, 1], ... somewhere in our list.</p>
  
  <p>I want to construct a list so that list[0] = customer ID and list[1] = the most common type of item that he has bought, which means that a customerID only appears once in the list.</p>
  
  <p>How do I do that?</p>