You can certainly spread the pilgrimage over a number of years and trips. Many Europeans do. The key thing to remember is to get your credencial stamped wherever you stop a particular year's journey and get it stamped again in the same place (town or village) when you come back to resume it. Thus documents your continuity and that you started again from just where you left off.
There are actually two different certificates that you can get from the Pilgrim Office in Santiago. One is the Compostela, that henrythedog referenced above. The other is a Distance Certificate that includes information like: how far you walked, from where, on what route. This information is not on the Compostela. The Distance Certificate is available at a modest price. There used to be a third, the Welcome Certificate, that was an alternative to the Compostela, given to non-religious pilgrims, but reports are that it is no longer used and Compostelas go to everyone who meet the requirements of distance walked and documentation of the journey.