def count_words(filepath, words_list):
    """

    Parameters
    ----------
    filepath : str
        Path to text file
        
    words_list : list of str
        Count the total number of appearance of these words
        

    Returns
    -------
    n : int
        Total number of times the words appears
        
    Usage: 
    count_words('../alice.txt', ['cat', 'dog'])

    """
    # Open the text file
    with open(filepath) as file:
        text = file.read()

    n = 0
    for word in text.split():
        # Count the number of times the words in the list appear
        if word.lower() in words_list:
            n += 1

    print('Lewis Carroll uses the word "cat" {} times'.format(n))

    return n