i always worry about accepting the comp raise after getting an outside offer...it buys them enough time to find your replacement...at which time you're screwed out of both jobs...
I guess it depends on how you approach it. If your current company has to replace you, it is likely going to cost them about the same to bring in someone of your talent + cost them more to train them, so it is worth it for them to keep you.
The best way is to tell them that you enjoy working there, want to continue working there, bla bla bla, but feel that you can't start a family or whatever the reason is on your current salary, and that you've entertained other offers to determine your value.
If, on the other hand, you come in and say "I got another offer and if you don't match it I'm gonna leave", they might be looking for your replacement. I know I would be.