Is there a Mac text editor that has live display of unique word count? That is, it shows, while you type, the count of unique words. Not a count of all words.

If the document had the words:


  The cat is in the hat which is in Toledo.


It would show a count of 7.

I know I could write a short shell script to do this but I'm looking for real-time display. If you know of an editor that allows writing such a real-time plugin that would be helpful as well.
Emacs can do it (as most things). Have a look at this page. The part: "How many times was each word used?" - is quite similar to your problem. WordCountMode shows how to put the info in the modeline. Shouldn't be too hard to get in a form you need.