Export: counting number of repeated values

With such code

$filename(C:\Users\USER\Documents\!   Mp3tag export list.txt,utf-16)$loop(%TITLE%,1)%TITLE%

I can create a list of all the titles that I have. And if two or more files have the same value in TITLE, then it is not repeated on the exported list

How about adding something like

    #### REPEATS: X

at the end of such TITLE that was repeating itself [and the X being a number of them? Can it be done in Mp3tag or would it have to utilize some functions of for example Notepad++ [which would have to operate on a list including every instance of a repeating itself TITLE]?

I would think that such a number would lead to guesswork as you would not know if e.g. with a value of 3 and the actual repetition of 3 if there would be a 4th and you would have needed to set the loop counter variable to 4.
If you loop by title without any ",1)" as looping instruction then, ideally, you get each title only once.
On the other hand: if you see a title more than once then you have your duplicate.
So I would not see the necessity for a different implementation.

Edit: you can create such a counting report yourself with $put() and $get() and $add() and an appropriate set of loops.