Use atomic updates for counts instead of locking