This is what the Pilgrim's Office in Santiago de Compostela (the guys issuing the Compostela) states:
"You must collect the stamps on the “Credencial del Peregrino” from the places you pass through to certify that you have been there. Stamps from churches, hostels, monasteries, cathedrals and all places related to the Way are preferred, but if not they can also be stamped in other institutions: town halls, cafés, etc. You have to stamp the Credencial twice a day at least on the last 100 km (for pilgrims on foot or on horseback) or on the last 200 km (for cyclists pilgrims)."
Bradypus is absolutely correct, the information you were told in Sarria is not correct. . . or should I say, it is incomplete