title: Letter Count on a string
body: <p>Python newb here. I m trying to count the number of letter "a"s in a given string. Code is below. It keeps returning 1 instead 3 in string "banana". Any input appreciated. </p>
  
  <pre><code>def count_letters(word, char):
      count = 0
      while count &lt;= len(word):
          for char in word:
              if char == word[count]:
                  count += 1
              return count
  
  
  
  print count_letters('banana','a')
  </code></pre>