It will always be unique within one TiddlyWiki. Same as "Sequence numbers" in an Oracle Database.
The UID isn't really a counter. It gets the the largest value of UID that exists among the tiddlers, then gives "this tiddler" the greatest value + 1.
So not a counter in the sense of a stored value in some field. Maybe, for performance, I'll have to set things up that way someday, but not for now.
That said, this is only about unique and stable permalinks for Tiddlers in a TiddlyWiki, not about unique identification of tiddlers.
If you wanted to, you could create a bunch of tiddlers, and copy-paste the UID's among a bunch of them so that a UID permalink actually opens a group of related tiddlers, if that's something someone wanted.
To reiterate: The UID's are not about unique identifiers for tiddlers. That's a different problem, but one that I don't think needs solving. Well, until it ever bites me in the caboose. It hasn't yet, but my caboose is polished and ready for the bite at any time.
That aside ...
Say we both have TiddlyWiki's that use this UID thing I've developed.
And say I import one of your tiddlers into my TiddlyWiki, and I now have two tiddlers that have UID values of 55. One of mine, and the one I imported from your TiddlyWiki.
Who cares?
Every URL link out in the wild that references my TiddlyWiki with UID 55 will now open with my tiddler and your tiddler.
However, my original intent for the UID permalink is not borked. We can still easily get to my tiddler.
If your tiddler (UID=55) gets to be a real pain, then I'll strip the UID off of your tiddler that is in my TiddlyWiki.
Anyway, all of that said, this UID-permalink thing does what it is supposed to do in the problem scope I'm thinking, but is in no means meant to solve the problem scope of unique identifiers for all the tiddlers in the world. That is not a problem I am interested in at all.