Added a sigfault protection and count_words() + a check for `set prompt` to be in the beginning of the command.