input: Write a python function to count words from a given text file.
  assert WordCounter('testfile1.txt').get_word_counts() == {'hello': 2, 'world': 1}
  assert WordCounter('testfile2.txt').get_word_counts() == {'python': 3, 'java': 1, 'code': 2}
  assert WordCounter('testfile3.txt').get_word_counts() == {'example': 4, 'test': 2, 'function': 1}
output: class WordCounter:
      def __init__(self, filename):
          self.filename = filename
  
      def get_word_counts(self):
          word_counts = {}
          with open(self.filename, 'r') as file:
              for line in file:
                  words = line.strip().split()
                  for word in words:
                      word = word.lower()
                      if word in word_counts:
                          word_counts[word] += 1
                      else:
                          word_counts[word] = 1
          return word_counts