[Memory management] Function for inspecting a pointers reference count