Added a temporary counter in ReferenceCounter for debugging.