I almost always got mine at check in. During the last 100 Km, I tried to get two per day (e.g., at a bar along the way) as required for the Compostella, but there was at least one day when I didn't get the second stamp. They don't seem to enforce that rule too closely.