keeps count of the words you type into a textbox.