input: Write a python function to count the number of syllables in a given word.
  assert count_syllables('syllable') == 3
  assert count_syllables('balloons') == 2
  assert count_syllables('education') == 4
  assert count_syllables('rhythm') == 1
output: def count_syllables(word):
      word = word.lower()
      vowels = "aeiouy"
      count = 0
      if word[0] in vowels:
          count += 1
      for index in range(1, len(word)):
          if word[index] in vowels and word[index - 1] not in vowels:
              count += 1
      if word.endswith("e"):
          count -= 1
      if count == 0:
          count += 1
      return count