Use an approach based on a list of weak references to count the number of `Proxy` instances -- this way the number will go down when `Proxy` instances disappear.