A few things to consider before accepting a counter offer:
By turning down the offer of a new job you have lined up will, more than likely, burn your bridges with that company. The new role may be the more suitable opportunity. Think over all the reasons why you started looking in the first place and what the new job and the counter offer will give you in the long term. A pay rise compels most people to accept a counter offer but a few months down the line the reasons why you where first dissatisfied are still there.
Handing your notice in is likely to damage your relationship with your boss. If you then decide to stay your boss may question your loyalty, and weather you’ll resign again at the next better offer, will they favour, seemingly more committed, colleagues?
A counter offer usually means a promotion or salary increase, this often comes with higher expectations and responsibilities.
Underlying issues are not solved by a counteroffer, think about your options before committing to a decision.