The time counts. I'm going through all of this right now.
I did HPSP, deferred for anesthesiology residency and CCM fellowship. While you are in residency you are a medical corps officer in the IRR (inactive reserve). That time counts for three things; 1. Pay, 2. Promotion, 3. VSP It doesn't count for retirement at all though.
Your med school time doesn't count for anything.
1. Make sure you PSD sees your commissioning papers following med school that will establish the correct date for pay. You should be at the over four years. The new commissioning just transfers you from a reserve physicians (2105) to active duty physician (2100). This can take a week or so for PSD and BUPERS to process. If you dont' have a copy of your med first LT commissioning you'll have to wait until you get to your first duty station?
2. Promotion Five years in grade is required to be reviewed for O-4. So, later this year you need to make sure your packet is submitted for the O-4 board. NOTE: The promotion board has some sort of policy where they generally don't review officers during their first year coming into active duty from the reserves. You need to submit a waiver letter so your packet will be seen. O-4 selection is automatic in medical corps, so make sure your packet is submitted. Promotion equals more base pay and more BAH. Don't miss out.
3. VSP Remember you get paid from a few different special pays (ASP, ISP, VSP, and eventually BCP when you pass your boards). Most of them are fixed amounts, expect VSP. Less than 6 years as a medical corps officer VSP is $466 month. At the six year mark it goes up to $1000. So make sure special pays coordinators at bumed have it right. I can give you their names and emails if you pm me.
Have some cash on standby. They aren't real quick. You might get a head start if you do ODS first. It will give PSD and BUPERS some lead time to set up your pays.