You earn the country flags automatically as you walk. You only earn a flag when you reach a country that has a milestone in it - not for walking through other countries on the way from milestone to milestone. We don't have a way to award country flags for the intervening countries.