Instant
Choose target spell. Scry 3, then reveal the top card of your library. Counter the chosen spell unless its controller pays {X}, where X is that card's mana value. (To scry 3, look at the top three cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)