Count the Vowels

Count the Vowels

Given a String str count how many vowels it contains.

Assumptions

  • y is not a vowel
  • str can contain any valid characters - upper or lower case letters, numbers, spaces, punctuation
countVowels( "hello" ) => 2
countVowels( "HELLO" ) => 2
countVowels( "wxyz" ) => 0
countVowels( "abcdefghijklmnopqrstuvwxyz" ) => 5