Do you have a master app that is somewhere on a server? If so, you could create a kind of licence deamon, requesting the master app for a validation when the program starts. This can be achived quite easily by placing a server socket in the app, and respond only to validation questions. On startup, you will have to check whether the machine is the master, and, if so, start the listener.
If there is no master app, you could, at startup, broadcast a message across the network, trying to find another instance. If not found, the current instance becomes the number one. Otherwise, the number of already active apps can be returned. Stop the broadcast as soon as you have found another instance.
These are just two possibilities. I hope this helps you in the right direction.
Cheers,
Nico