Text (6th/7th+errata): Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard. [Oracle 2009/07/08]
The card does not go to the graveyard before being put on the library. [bethmo 1997/10/19]
If the spell is not countered (because the spell it targets cannot be countered), then it does not go to its owner's library. [D'Angelo 2001/04/16]
This card has a self replacement. This means that it replaces going to the graveyard before any other effect can replace that event. [Rules Team 2001/05/01] If Flashback is applied using Recoup, however, Flashback will change the destination. [DeLaney 2001/10/13]
Note - In Fifth Edition (and before) this card was of type Interrupt.