You will need to compare each char in the String to 'a' using an in statement, if it is an 'a' increment a count.

Or you could use a regular expression.