You may very well get more out of, and put more into the couter-offered position. It would suck to work 5 months knowing you're leaving a company that values you this much, and willing to pay extra to keep you on board and happy again.
To my mind, moving onto the new contract would be a mistake. You don't even know if that'll work out. You know that the counter offer will.
To my mind, moving onto the new contract would be a mistake. You don't even know if that'll work out. You know that the counter offer will.