input: Write a function to count the number of words in a string. The function should return the number of words as an integer. If the input string is empty, it should return 0.
  assert word_count('Hello world, this is a sentence.')==5
  assert word_count('This is another sentence with more words.')==7
  assert word_count('SingleWord')==1
  assert word_count('')==0
output: def word_count(s):
      if not s:
          return 0
      return len(s.split())