input: Write a function to count the number of words in a given string. The function should split the string by spaces and return the length of the resulting list. If the string is empty, it should return 0.
  assert count_words('Hello world, this is a sentence.')==5
  assert count_words('Python is great')==3
  assert count_words('')==0
  assert count_words('One')==1
  assert count_words('This is a test')==4
output: def count_words(s):
      if s == '':
          return 0
      return len(s.split())