Neerdiv's last ability resolves before the spell or ability that caused it to trigger. It resolves even if that spell or ability is countered or otherwise leaves the stack without resolving.

Artwork
Loading artwork…
Neerdiv, Devious Diver
Foundations Jumpstart · #36 · EN
Nonfoil—Foil—
Card rules
Whenever Neerdiv becomes tapped, target player mills cards equal to its power.
Whenever you cast a spell from your graveyard or activate an ability of a card in your graveyard, draw a card and put a +1/+1 counter on Neerdiv.
2/2
Rare · Illustrated by Yuchi Yuki
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Oathbreaker Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If Neerdiv leaves the battlefield while its first ability is still on the stack, use its power as it last existed on the battlefield to determine how many cards the target player mills.