in reply to Sentence Measurer

well, for one you could put a + after your character class, so you don't count a word when you have something like two spaces side by side...

you have a lot of repetition in your character class... \w is the same as ummm... a-zA-Z0-9_ (pretty sure), but that shouldn't prevent it from working... really, what is wrong with splitting on whitespace, \s+
That should give you a decent count.

as an aside, you can do $Counter++ to add one to counter, or even $Counter += 1;

                - Ant