This is more common than you think. Lots of people stop and re-start their educations. One of my sisters took a 20 year break in her education in order to raise 5 kids. And yes, her old credits from previous institutions did transfer into her final degree program.
If you intend to return to the same place where you are currently studying, do meet with your advisors there and find out what steps to take to smooth the process. Each place sets its own policies and procedures for this.