Yes, it can be done in separate trips.
If you do not want to get a Compostela, there are no rules at all.
If you want to get one, there are only these rules on the last 100 km:
[To get the "Compostela" you must... collect two stamps a day on the last 100km ... details here: ]...