def count_words(input_sentence): sentence = input_sentence.lower() words = sentence.split() result = {} for word in words: counter = 0 if word in words: counter += 1 result[word] = counter return result