def word_count(document, search_term):
    """ Count how many times search_term appears in document. """
    words = document.split()    
    answer = 0
    for word in words:
        if word == search_term:
            answer += 1
    return answer