Since enchantments can only be revealed after "things", immediately after the casting step is when to reveal it. (which happens to be the counter spell step) it makes you an invalid target for the quicksand, so the spell is countered and the quicksand caster still has to pay for it.
Enchantments can only be revealed between steps. While there is exceptions to this, this is the basic rule to apply.
(exceptions could be nullify or block which has this specified in the text on the cards.)
So eagle wings can be revealed
between step 1 and 2. Or between step 2 and step 3
After step 3, the creature will be restrained and cannot gain flying - Though you
can reveal eagle wings here with no effect before quicksand is destroyed.