If the spell is countered before the triggered ability resolves, then the ability will make a copy of how the spell looked right before it was countered.

Artwork
Loading artwork…
Mirari
Commander 2013 · #246 · EN
Nonfoil—Foil—
Card rules
Whenever you cast an instant or sorcery spell, you may pay 3. If you do, copy that spell. You may choose new targets for the copy.
"It offers you what you want, not what you need." —Braids, dementia summoner
Rare · Illustrated by Donato Giancola
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH Legal
Premodern Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You are not required to choose new targets. If you do choose, then the targets must be legal. If you don’t change them, the spell is placed on the stack whether or not the targets are legal. The legality of the targets is always checked on resolution of the spell, so the spell may be countered at that time if all of its targets are illegal.
It triggers once per spell, so you can’t get multiple copies of a spell using this card. And since this card is legendary, you can’t control more than one.
The copy is not “cast” so it will not trigger anything that triggers on a spell being cast.
Everything about the original spell is copied, including any decisions made on announcement, such as whether it was kicked or its Buyback cost was paid. Effects on the spell, such as Sleight of Mind or Flashback, are not copied.
You choose whether or not to pay when the triggered ability resolves.
If the copied spell requires a target and there are no legal targets, then the copy has the same target (which should be illegal) as the original.