title: How to count the number of letters in a random string?
body: <p>If there is a random string get from SERVER:</p>
  
  <pre><code>var str='I am a student in XXX university, I am interested...'
  </code></pre>
  
  <p>The <code>str</code> can contain random number of words with spaces. That's the content of the string is unpredictable.</p>
  
  <p>In javascript, how to count the number of letters in the string (<strong>spaces</strong> between words are <strong>exclusive</strong> from the counting). For example "I have a car" should be counted 9 letters.</p>