He does indeed face a maximum penalty of 2 1/2 years in the house of correction on each count, presuming the charges are prosecuted in district court. If indicted in superior court, he could face much lengthier state prison sentences. That said, defendants are rarely sentenced to the maximum possible penalty allowed by law. The sentence he receives will depend a great deal on the specific facts of the case and his prior criminal record. If he has never served time before, even if he has prior convictions he may stand a fair chance of avoiding jail time.
Your husband may qualify for a court-appointed lawyer. If not, he should contact a defense attorney immediately to discuss his case. If he already has a lawyer, these questions should be directed to his lawyer, as that attorney will be in the best position to answer them accurately. The prosecutor in your husband's case undoubtedly already has a sentencing recommendation which will give the defense attorney a good idea of what your husband realistically faces if he changes his plea or is convicted after trial.
While it is technically true that he could get 2 1/2 year committed on each count, run consecutively for a total of five years, it is not very likely that he will be sentenced so harshly, even taking into consideration his record. Shoplifting is a fairly minor offense. He is more likely facing some sort of probationary sentence with drug testing, perhaps something as light as a continuation without a finding (CWOF) for 1 year. The factors you mention (sobriety, in school, expecting a child) all favor a non-incarcerated sentence.
Best of luck,