I see so many posts here of people thinking about counteroffers.
I thought that it was common knowledge to never take a counteroffer, but some people here seem to actually consider it, so I thought I'd post this.
You should never consider a counteroffer inform your current employer after you've announced your intention to resign, even if the offer is much better than what your new employer is offering.
It doesn't matter how good it is, a counteroffer is almost always a trap. Once you say that you're ready to leave, they are going to try to figure out how to replace you after they have had time to prepare for your departure. The counteroffer is usually just a way for them to delay you leaving until they have your replacement trained up. At that point, they'll fire you or (if there's some reason they can't fire you) start treating you like garbage so you'll quit. At that point it's very unlikely the new job offer will still be available and you'll have pissed off your potential new employer.
If you have an offer you're willing to leave your current job for, take that offer, don't look back, and don't listen to anything your old employer wants to say about it.