To protect against ABA issues it is sufficient to only update the counter in pop operation, isn't it? Might be wrong though...