update ref count