Form field Limiter IE


I am using this script fine to limit the number of chars on a small web application. I was wondering if it was possable to alter the script so it would work on number of words instead of characters.

Ive had a look at the code but im not much of a java developer so im wondering if anyone knew how to do it.