Finished count_words fucntion.