In CT book 5 nothing is said either way about whether academy/college time could be counted towards retirement terms or not.
It also makes no mention of any required length of service after graduation from the Academy, just that the PC is automatically in the Navy as an Ensign.
As CT is the only version I deal with, I had to make my own rulings, and I used the example most familiar to me (US military regulations).
The following is for US Service Academies only:
The commitment is normally five years of active duty and three years of reserves, although it has varied. The obligation attaches on the first day of a cadet's second class (junior) year, and non-graduates after that point are expected to fulfill their obligations in enlisted service.
So you are technically free to depart with no obligation during the first year, but become a legally-obligated member of the military the first day of your second year. Even if you drop out, fail, or are expelled from the Academy on the second day of your second year you still must serve the obligated time... although you will be doing it as an enlisted person, not as an officer.
Note that NONE of the time spent in the Academy counts towards the obligation... nor does it count towards retirement!
http://militarypay.defense.gov/retirement/ad/19_faqs.html#Q2
So IF you base your rules on US military regulations, then Academy time doesn't count. Instead, I'd count "college" time as being virtually a separate "service", and use whatever mustering out tables that your version of Traveller uses for that career (in my case, the rules in JTAS #22 for the
Imperial Academy of Science and Medicine).
Note also that the PC MUST spend 2 4-year terms in the service
after graduating from the Academy.