Your boss is upset about losing you and presents you with a counteroffer. A counteroffer is an attempt by your current company to persuade you to stay. Don't let familiarity cloud your judgment. Ask yourself whether the new position is a positive step toward advancing your career. If the answer is yes, then proceed with pursuing the position.
Some companies never make counteroffers.
In others, it's a fairly common practice. First, morale is likely to suffer, particularly among your closest coworkers. Management will notice, and your resignation may be perceived as an unfavorable reflection on your boss. This may consist of a raise, a promotion, change in title or job description, or a combination of these factors. It may even be just a promise of change to come.