title: Count letters in a word in python debug
body: <p>I am trying to count the number of times 'e' appears in a word.</p>
  
  <pre><code>def has_no_e(word):     #counts 'e's in a word
      letters = len(word)
      count = 0
      while letters &gt;= 0:
          if word[letters-1] == 'e':
              count = count + 1
          letters = letters - 1
      print count
  </code></pre>
  
  <p>It seems to work fine except when the word ends with an 'e'.  It will count that 'e' twice.  I have no idea why.  Any help?</p>
  
  <p>I know my code may be sloppy, I'm a beginner!  I'm just trying to figure out the logic behind what's happening.</p>