input: Write a function to count the number of words in a given string. The function should return the number of words as an integer.
  assert count_words('Hello world, this is a sentence.')==5
  assert count_words('This is another sentence.')==5
  assert count_words('Single.')==1
  assert count_words('')==0
  assert count_words('The quick brown fox jumps over the lazy dog.')==9
output: def count_words(s):
      if not s:
          return 0
      words = s.split()
      return len(words)