Quash

Oracle Text

Counter target instant or sorcery spell. Search its controller's graveyard, hand, and library for all cards with the same name as that spell and exile them. Then that player shuffles their library.

Card Rulings

10/4/2004 It exiles the countered spell. This is because the first sentence puts the spell into the graveyard before you continue to the second sentence.
10/4/2004 If the spell is not countered (because the spell it targets can’t be countered), then it does not get exiled but all the other copies in the graveyard, hand, and library are exiled.
2/1/2005 Quash can exile cards even if the spell countered was a copy of a spell. For example, if you Quash a Boomerang cast from an Isochron Scepter, you may search for and exile cards named Boomerang.
2/1/2005 If Quash counters a spell that has had text spliced onto it, only the base spell may be exiled. For example, if you use Quash to counter a Kodama’s Might with a Glacial Ray spliced onto it, you may search for and exile only Kodama’s Might.
2/1/2005 The copies must be found if they are in publicly viewable zones. Finding copies while searching private zones is optional.