In case anyone needs to hear this: never accept the counter offer. They want you to leave at a time that's good for them, and see your pay increase as a temporary inconvenience until they hire your replacement anyways.
And I tell my employers this too. Nuclear deterrence only works if the enemy knows about it.