I worked at different school districts in Maryland. Will those years count towards the years of service for retiree benefits?

No, for retiree benefits eligibility the cumulative years of service are with HCPSS only.