If the controller of the target spell pays X, the spell won’t be countered. Mindswipe will still deal damage to that player.

Artwork
Loading artwork…
Mindswipe
Khans of Tarkir · #189 · EN
Nonfoil—Foil—
Card rules
Counter target spell unless its controller pays X. Mindswipe deals X damage to that spell's controller.
"The past and the unwritten are frozen. To understand their meaning requires heat." —Arel the Whisperer
Rare · Illustrated by Ryan Alexander Lee
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander 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 the target spell is an illegal target as Mindswipe tries to resolve (perhaps because it was countered by another spell or ability), Mindswipe won’t resolve and none of its effects will happen. No damage will be dealt.