title: Python length of unicode string confusion
body: <p>There's been quite some help around this already, but I am still confused.</p>
  
  <p>I have a unicode string like this:</p>
  
  <pre><code>title = u'test'
  title_length = len(title) #5
  </code></pre>
  
  <p>But! I need len(title) to be 6. The clients expect it to be 6 because they seem to count in a different way than I do on the backend.</p>
  
  <p>As a workaround I have written this little helper, but I am sure it can be improved (with enough knowledge about encodings) or perhaps it's even wrong.</p>
  
  <pre><code>title_length = len(title) + repr(title).count('\\U') #6
  </code></pre>
  
  <p><strong>1. Is there a better way of getting the length to be 6? :-)</strong></p>
  
  <p>I assume me (Python) is counting the number of unicode characters which is 5. The clients are counting the number of bytes?</p>
  
  <p><strong>2. Would my logic break for other unicode characters that need 4 bytes for example?</strong></p>
  
  <p>Running Python 2.7 ucs4.</p>