input: Write a function to count the number of words in a given string.
  assert count_words('Hello world, this is a sentence.') == 5
  assert count_words('This is another string.') == 4
  assert count_words('SingleWord') == 1
  assert count_words('') == 0
output: def count_words(s):
      if s == '':
          return 0
      words = s.split()
      return len(words)