Typically your best opportunity for a big raise is in the initial salary number. Future raises are often at least partly formula-driven. And since they are likely to be computed as a percentage of your current pay, perhaps with a merit component as well, getting more in the initial salary also means your raises will be more later.
If you have to announce you are leaving before they acknowledge (or realize) your value to them, you should probably leave no matter how much they offer you. That's hard to do if you really like the place, but it's usually a sign that there are bigger problems. I took a counter offer once, and it worked out OK, but things always felt a little awkward with my manager after it.
you don't have to threaten to leave to get a raise; you talk with your manager and tell him what you think you're worth and why its important to you that you make that, and you have a conversation about it. maybe you haven't demonstrated that you're worth it (go get a blog, speak at a user group, go earn your credibility). maybe the organization doesn't value talent at low levels [1], in which case you'll never get top compensation.