check ref count