Use atomic_fetchadd_int() to simplify the reference counting logic.