Counts the amount of words in a text file