>What about createing a collection with the text as a key and counter as a value?
>
Hmm, this sounds like a nice idea. But I've already changed the code using multiple new variables. It may be not a very nice code, but I guess it would work.
But I'll definitely keep this idea in mind for the future.
If it's not broken, fix it until it is.
My Blog