I'm currently working on rich text editor, which I'm planning to add loads of functions into it. I'm just not sure on how to make a Word and Character counter for it. Not sure why I want it; but it just looks cool.

Any help would be appreciated, and thanks in advance.