Once you've announced your intention to leave, even just privately, it changes your relationship. Accepting a counter-offer is just going to leave things awkward.
Very awkward I'd say. A counter offer is just adding insult to injury, e.g. why was is not offered with salary adjustments earlier.
In my experience only two scenarios offer a substantial raise in pay: Switching jobs or Getting a new role/title.