"By the time it gets to a counter-offer stage, it's often too late." - so true!
Also made me think of the Netflix HR/culture document [1] - pay the max you would be counter-offering for an employee right off the bat, don't wait unitl you actually have to give a counter offer (which would probably be too late anyway)