Immaterial. You never take the counter-offer.
An employer who refuses to reward you until you're at the point of looking elsewhere is not worth remaining at. Further, you'll wind up on the short-list of problem employees and in the event that they do need to reduce headcount you will be disproportionately likely to lose your job earlier, thus disadvantaging your next job search.
There's no upside to taking a counter-offer beyond immediate convenience.
It is not the counter-offer which counts, that in my book is too late. It is the end-of-year reward which should be AUTOMATICALLY adjusted per inflation plus at least a 5% increase if you overperformed. So I always expect a 10% incease WITHOUT asking for it, or else I'll move on.
On my side, I always overperform more than 10% so I deserve what I expect. The employer? not much, they don't care. They will never care. Their book forbids 10% increase for every employee.
Key point, not EVERY employee deserves 10% increase. Only overperformers. HR guys need to understand that and learn to differentiate and reward accordingly, which they don't. They are also collecting their winnings every month.
ps. I am not talking about food a la carte, or gym towels. I am talking about money and vacation time. Everything else is a welcomed addition to the perks.