Staff of the Magi enters with four charge counters.

, Remove two charge counters from Staff of the Magi: Staff of the Magi deals 3 damage to target damageable.

, Remove two charge counters from Staff of the Magi: Counter target spell.
When there are ten or more charge counters on Staff of the Magi, sacrifice it and it deals 10 damage to each damageable.
When a spell that targets a player is countered by a spell or ability you control, put a charge coutner on Staff of the Magi.
I use "target damageable" instead of "any target", but the meaning is the same. "Each damageable" affects all players, creatures, planeswalkers, and battles.