A counteroffer from your employer is a good solution if you know for sure that your company appreciates you as a specialist, and you, in turn, are completely satisfied with the work and the counteroffer fully meet your needs.
In addition, if the company experiences hard times, maybe you should hold off on finding a new job, at least until everything returns to normal, and you'll be sure that you won't do serious harm to the company?