title: Unique numbering of unsorted sets
body: <p>Is there a way to make this </p>
  
  <pre><code>          ---A---
              John
              John 
              Tim
              steve
              John
            -------
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>        -----A--------B------
             John       1
             John       1
             Tim        2
             Steve      3
             John       1
          ---------------------
  </code></pre>
  
  <p>Have a large data file with duplicate names, and would like to number them in the way mentioned in order to use them in another way.</p>