I'm afraid there is no easy option. In theory you could just query the DB, but that would break your security model. You could make the process record its presence by adding an item to a queue and then locking it. If the process failed, the item would get the exception 'Automatically set at cleanup', if the process completes, then it can just mark the item as complete. To answer the 'how many of me are there?' the process could count the number of locked items. To avoid the chance that the count is made at the exact moment between adding and locking an item, you could use an environment lock to ensure 'one at a time' access to the queue.
I totally accept this is way too much work for something that should be easy!