Undying reads: 'When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.' The condition checked is simply whether the creature had no +1/+1 counters on it at the moment it died (CR 702.93a).
Importantly, +1/+1 counters and -1/-1 counters do annihilate each other — one of each is removed simultaneously as a state-based action (CR 704.5q). However, this annihilation only happens while the creature is on the battlefield. By the time the game checks undying (after the creature has died and is in the graveyard), state-based actions no longer apply to clean up those counters retroactively.
So if a creature dies with, say, one +1/+1 counter and one -1/-1 counter both on it, the game sees that it had a +1/+1 counter when it died. The undying condition ('had no +1/+1 counters') is not met, and undying does not trigger.
Example: You control a Strangleroot Geist (which has undying and already returned once, bearing a +1/+1 counter). An opponent's effect puts a -1/-1 counter on it. Now it has both a +1/+1 and a -1/-1 counter. Normally state-based actions would remove one of each, but if it dies before that cleanup happens in the same action — or even after cleanup leaves it with zero of each — the timing matters. If it dies while still bearing the +1/+1 counter (before SBAs fire), undying won't trigger. If SBAs removed both counters first and it then dies with none, undying would trigger.
The key takeaway: undying's condition is evaluated at the moment of death (CR 603.6, 702.93a). If any +1/+1 counter remains on the creature at that instant, undying does not trigger, even if -1/-1 counters are also present.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.