Finished question 4, by taking the lines in the file and finding the number of words in each line