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

Artwork
Loading artwork…
Danitha, Spear of Agony
Reality Fracture · #227 · EN
Nonfoil—Foil—
Card rules
First strike
Whenever you cast a spell that targets an opponent or a creature an opponent controls, put a +1/+1 counter on Danitha.
2/2
"To know the Cabal is to know despair. None can stand against its legions."
Uncommon · Illustrated by Bryan Sola
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Danitha's triggered ability triggers only once per spell that targets an opponent or a creature an opponent controls, regardless of how many targets that spell has.