First of all, never inform your current employer of anything until you have a firm offer from company B. Your next step depends on whether Company B is just a lateral move, or a real promotion with more money.
Assuming Company B offered you more money/benefits/promotion, the only way you're going to get your company to counter-offer and match or exceed the more money/benefits/promotion would be if you showed them that you are worth that additional $$ to them. Just because a different company offered you more $$ doesn't mean you're worth more money to the company you're at now. Make a list of your accomplishments and contributions (preferably showing how you made them money or saved them money), then sit down with your boss and tell him/her why you believe you deserve more money/benefits/promotion.
If your boss gives you a counter-offer, remember that this may affect future promotions and other decisions negatively. In other words, you've just shown them that you're willing to leave them so they know you're not loyal to them. Their counter-offer had better be good for you to decide to stay. If your company doesn't counter-offer or offers something less attractive than company B, then accept the offer from company B and enjoy the progress in your career!
Monster.com has a great bulletin board with "salary and negotiation tips" that you can read. It's very informative.