Counter-offers usually buy a year
And they change the relationship afterwards.
The counter-offer is the standard response to a resignation and it is a poor investment. The reasons somebody decided to leave are rarely resolved by pay, and the well-documented pattern is that a substantial share of people who accept leave within a year anyway.
It also has effects on everybody else. Once it is known that resigning produces a raise, the mechanism for getting one has been established, and it disadvantages the people who did not threaten to leave, which are usually the ones the organisation most wants to keep.
The relationship changes too. A person who accepted a counter-offer is known to have been leaving, and that knowledge affects what they are trusted with, whether they are told about future plans, and how they are viewed in a restructure.
The better moment for the money was six months earlier, unprompted. Where a person is genuinely underpaid relative to their contribution, fixing it before they look is both cheaper and produces the loyalty that the counter-offer does not.
There is a further limitation of exit data worth naming, which is that the people whose reasons matter most are the least likely to give them. Somebody leaving because of a specific manager will rarely say so to that manager's organisation, particularly where the process is run by somebody they do not know.