As far as I know there is no inbuilt way to do this with EZ. But as there is the PHP function substr_count for this, you just need to write an EZ template operator for this. More info about how to do this is here:
Up to my humble knowledge, you can solve this in two ways,
A. Write your own operator using php.
B. using the existing operator as follows:
1. explode the string into array1 (see link below)
2. use the unique operator of the array1 to make array2. 3. Compare the two arrays if they are the same then there are no repeated words. If not then you can iterate (may sining foreach) through the two arrays to find the duplicate words
May be someone else can help you better than me. I just tried.