The only hard rule in business is that there are no hard rules. My suggestion is that you consider the new job and the counteroffer, and do what you think is best for you.
I once accepted a counteroffer, and I do not regret having done so. My employer didn't start looking for replacements, there was no discussion about my loyalty, and I was pretty happy with my job. I eventually left three years later; my previous employer is now my client, and we still have a good relationship. And guess what: the counteroffer didn't even include a pay raise.
In my case, I was dissatisfied with a reorganization which affected me negatively. I knew it was not personal, but I saw no path to going back to the team I wanted to be in. I found an offer with a greatly increased salary, but at a company which would give me less professional and personal satisfaction.
I gave my notice, which led me to a meeting with a C level executive (this is at a company with around 5000 employees), to whom I explained the situation. They told me I could go to whatever team I wanted, whenever I wanted from now on. That showed me enough goodwill, so I moved to the team I wanted, which gave me some very solid experience, which eventually led me to my current job, where I'm paid even more, and with a lot of upward mobility.
Recruiters will be furious, because they lost a lead, and they don't want that to happen, so they come up with the reasons you will find on almost any website, including that commonly unfounded statistic of 80%, 90%, 76%, or whatever.
But guess what, I didn't even "burn the bridge" with my potential new company, nor with the recruiter. In fact, it was the same recruiter who helped me land my current job several years later. The moral of the story is that you shouldn't believe every horror story that you hear.
A job is a business exchange. You do a job in exchange for money. Nobody is doing favors to anybody here, so that talk of loyalty is nonsense. Especially in IT, and other specialized fields, finding somebody who is good is very expensive and time consuming, so it makes sense for a company to want to retain their talent. But it is true that if you want to quit because of cultural issues, it is likely that the problem won't change by accepting the counteroffer.
I'm not saying that you should stay, or that the same that happened to me will happen to you. Instead, I suggest you carefully consider the pros and cons of taking the new job or the counteroffer, and decide based on what you think is best for you. Not what's best for the company, not what's best for the recruiter. What's important here is you and your future. If you make you decision with your best interests in mind, you won't regret that decision.
I'll leave you with a refreshingly honest article about reasons why you may want to accept a counteroffer.
https://www.linkedin.com/pulse/yes-sometimes-you-can-accept-counter-offer-adam-karpiak
Good luck with your decision!
Appendix
"x% of employees leave after y months anyways"
Since I initially wrote this answer, I've searched quite a bit for some primary sources of this quote, and so far I've found none. There are hundreds of sites attributing similar quotes to some unnamed "research" or "data", and almost all of them have different numbers for it. It almost seems as this is a typical case of a logical fallacy called "argument from authority", or even "proof by repeated assertion".
Interestingly, I found a recruiter who has dedicated some time finding this mythical data, and is offering 250 British pounds to a charity of your choice, if you can find some serious research, with statistically significant data on counteroffers, regardless of the actual numbers.
Before you read one of those millions of sites asserting that you should never accept counteroffers, keep these points in mind:
- Look at who's writing the article. Chances are that it is written by a recruiter or a recruiting firm. Counteroffers are definitely negative for recruiters, since accepted counteroffers mean no bonus, and that the time spent on working on a particular lead is "wasted". If you choose to consider the recruiter's feelings and finances when making a decision, make sure it is a conscious choice, and not just that you're being manipulated.
- Without knowing the exact methodology used to arrive to these numbers, it's difficult to know what's behind them. For example, online surveys are often susceptible to self-selection and confirmation biases, which means that people who had a bad experience with a counteroffer are more likely to participate in an online poll about counteroffers, and that can seriously skew the results.
On loyalty
One of the commonly mentioned reasons to reject counteroffers is that "when you put your notice, they know you are not loyal, and will start finding your replacement, and try to fire you as soon as possible".
I find this assertion to be complete rubbish, and it looks much more as an urban legend, than a real issue. Let's take a closer look:
- "They know you are not loyal": A work contract is not like marriage. I don't think many companies are expecting that you will work with them from graduation to retirement. Most likely this is not the first company for you, your manager, or at least somebody in the entire company. If this assertion were true, why would a different company hire you, since doing so would mean that you were already "unloyal" to a previous company?
- "they will start hiring somebody else": Hiring rarely works like this. Teams usually have open headcount or they don't. Especially for IT and specialized fields, hiring is extremely difficult, so even if headcount opens, it doesn't necessarily mean that they will find somebody right away.
- "They will fire you when they can": This is in my opinion the most ridiculous part. If a company gives you a counteroffer, it means that they want you to stay. Firing somebody who is bringing enough value to give a counteroffer, just because they looked somewhere else sometime in the past, is not a very good reason to do so. Furthermore, firing somebody is way more expensive than having them quit voluntarily (depending on the jurisdiction), so make sure you keep all of this into account when making your decision.
- You are not the first person to ever put a notice, and you won't be the last. Even if considering a new job is a big change in your life, it is a relatively insignificant event for the company. You either stay or leave, but in either way, business continues, and the company continues. In fact, only a handful of people (manager, some at HR, etc.) will ever know about this, and for them, this is part of what they do every day, so don't overthink it.
Salary
"If they increase your salary now, why didn't they did so before?", the saying goes. And the answer is "because you weren't threatening to leave back then!". That's how leverage works, and it would be unwise to threaten to leave a company unless you get a raise, if you don't have a solid offer in your other hand.
Remember that companies are meant to spend the least, while making the most. When you put your notice, a rational company will consider what the cost of losing you is, and offer you no more than that. That's perfectly fine, and that's part of what doing business is all about.
Regret
In my opinion, the most important aspect of making a decision is not regretting it. You may accept the counteroffer, only to get fired later; and you may go to the new company, only to find it didn't work out. You only get to choose one path, and you don't know how it will turn out.
When making decisions, what works for me, is analyzing the pros and cons of each path, and if I make the decision that makes the most sense, I know I won't regret it, even if it doesn't turn out how I expected in the long run.
My suggestion to OP is the same. Analyze the situation, and make what makes the most rational sense.