changed error messages for count_words