title: Algorithm for Auto-Appending a Unique ID to Duplicate Titles
body: <p>I have a user that enters a piece of data into my database and titles it "Widget Title". If he calls another item "Widget Title", and another, and another, when he sees them in his widget list I'd like to show them like such:</p>
  
  <ul>
  <li>Some Item</li>
  <li>Widget Title</li>
  <li>Some Other Item</li>
  <li>Widget Title 2</li>
  <li>Widget Title 3</li>
  <li>Yet Another Item</li>
  <li>Widget Title 4</li>
  </ul>
  
  <p>Where each duplicate occurrence has its own appended incrementing id.</p>
  
  <p>Would you do this on the way into the database or when you display the output for the list?</p>
  
  <p>Can I have the algorithm?</p>