I don't know of a easy way to do that through GDL, as each object would need to write its ID out to a text file or something in order to have the objects check each other. However a far easier solution would be to set up a schedule to list out all of the objects, their IDs and quantity. Then the users just need to check the list occasionally to make sure all IDs are unique.
Lachlan Green | Wilson Architects | BIM Manager, Architect
Since AC9 | Currently AC27 & AC28 Tech Preview | BIMCloud | GDL
Mac Studio (14,13) M2 Max, 64GB, 1TB SSD | MacOS 14.4