Mindsparker'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 without resolving.

Artwork
Loading artwork…
Mindsparker
Foundations · #628 · EN
Nonfoil—Foil—
Card rules
First strike (This creature deals combat damage before creatures without first strike.)
Whenever an opponent casts a white or blue instant or sorcery spell, this creature deals 2 damage to that player.
3/2
Uncommon · Illustrated by Wayne Reynolds
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
If an opponent casts a spell that's both white and blue, Mindsparker's last ability triggers only once.