By telling your current employer about your new offer, you insinuate to them that you're actually interested in staying, but want a raise to do so.
If you really wanted the new job, and liked their offer, then you should have just kept your mouth shut about it, given your two weeks notice, and gotten on with life. Revealing your hand about a new job is often used by people that want a raise or to see how valued they are.
But, what it also does is red-flag you as a potential "leaver". If you stayed at your current company after accepting their counter offer, they're going to post an ad to find your replacement. Even if the counter offer they gave you was really amazing... they wouldn't be planning on paying you that for long. To them, you're just a cost-benefit equation. Now that they'd have to pay more for you, they'd decide to go find someone else they could pay less to that will do the same work.
So, offers and counter-offers don't matter any more... you're taking that new job whether you like it or not. Because, if you stay at your old job, you'll get fired 6 mo's down the road anyways after they secretly hire your replacement and train them to do your job.
Next time, don't tell your current employer you have a new job offer. Just put in your two weeks notice and leave. If they ABSOLUTELY want you.. they can spend a few months without you to realize how badly they need you.. then they'll contact you to make a REAL counter-offer and hire you back. And, if you come back on THOSE terms, they're more likely to keep you around.
It's all a big game. You have to know how to play it.
But, you sort of screwed yourself on this one. Take the new job and move on with life. If your old employer desperately wants you, they'll get in touch. But, don't stay at your old job. They'll just red-flag you as a "leaver".