Go back to why you started looking
Most people start looking for reasons that have little to do with pay: progression, their manager, the work itself. A counter-offer changes the figure and nothing more.
What tends to happen next
Your employer now knows you were ready to go. That changes the relationship, and plenty of people who accept are looking again within a year.
When it can be worth it
If the counter-offer brings a genuine change of role or reporting line, in writing, it deserves proper thought.

