If you are interested in the code, View Source (Ctrl+u).
How it works:
Word count function: This function is called by every keypress in the Input textbox. The fuction counts the number of characters already entered in the textbox, then subtracts them from the maxlimit value that the function is called with.
The code on this page is partly original and partly derivative. For all practical puposes it is in the public domain.