title: For Loop to Count Letters in a Word
body: <p>I'm just learning python and I came to a problem that required me to put a string as an input in my "count letters function."</p>
  
  <p>The function is supposed to count how many <code>"a"s</code> are in a word given (specifically, a fruit inputed by the user). </p>
  
  <p>The final value is correct, but in my function, it lists me the programs "procedure" if you will by listing how many <code>"a"s</code> are at each index and adding everything that was before.</p>
  
  <p>I just want one final value, not a list.</p>
  
  <p>If I'm not too clear, here is my program and test it out for yourself to see what I mean, and maybe help me come to a solution?</p>
  
  <pre><code>def count_letters(a):
      count=0
      for char in a:
          if char == 'a':
              count+=1
          print count
  
  a=raw_input("Name a fruit and I will tell you how many letters are in it." + '\n')
  print count_letters(a)
  </code></pre>