In your case, the best option would be to go away. As others have pointed out, the boss will see the counter offer as a threat. So even if he retains you at a higher pay, he's planning to find a replacement soon. Perhaps the replacement will be cheaper for him.