def get_count_words(text):
    """Converts from a text to a dict of words -> their count."""
    count_words = {}
    for line in text.splitlines():
        for word in line.split():
            count_words.setdefault(word, 0)
            count_words[word] += 1

    return count_words