Yeah you have to counter a spell before it resolves (obviously) but while it's on the stack it's considered a "spell." You can counter it anytime before it resolves, even if its been overlapped by another spell, etc.
So like with Bloodbraid cascades, you cast Bloodbraid, it goes on the stack as a spell, then you search for your cascade target, and then that goes on the stack over Bloodbraid. Someone can then cast Flashfreeze and target either of the two spells (assuming the non-bloodbraid spell is red/green)
With things like Swerve you can Swerve a Negate onto the Swerve itself.