Many articles have been written about this: don't ever accept a counteroffer (google "counteroffer" to find them). It is generally just a way to delay your departure until they can quietly find your replacement, at which point they will fire you. And you don't want to work at a company that only treats you fairly when you threaten them.