Javascript Count Words

In case the title isn’t obvious, this is some Javascript code to count the words in a text area. I totally stole it from RezaSh on StackOverflow.