Use the correct return type for the context ref count