counters must be released only after they have been unregistered