input: Write a python function to read a file and count the number of words in it.
  assert word_count('test_file1.txt') == 100  # Assuming 'test_file1.txt' contains 100 words
  assert word_count('test_file2.txt') == 250  # Assuming 'test_file2.txt' contains 250 words
  assert word_count('empty_file.txt') == 0  # Assuming 'empty_file.txt' is an empty file
output: def word_count(filename):
      with open(filename, 'r') as file:
          text = file.read()
          words = text.split()
          return len(words)