Some people think Switzerland was the first modern democracy. This is only half of the truth, actually. While people in some cantons and cities could indeed participate in the political process, a majority of Switzerland's inhabitants had no political rights at all until the Swiss Revolution of 1798 eliminated the old structures and replaced them with a centralistic democracy according to the model of the French Revolution (1789). This did, however, not work well and in 1803 Switzerland returned to a federalistic system while keeping up to the revolutionary principles of freedom, equality and solidarity. Six new member cantons (former territories without political rights) were admitted to the new Confederation. In 1815 three cantons returned to Switzerland that had been annexed by France (Napoleon!) after 1798 for strategic reasons.
For centuries, people in Switzerland identified themselves foremost with their canton. During the 19th and 20th centuries, however, industrialization led to an enormous migration inside Switzerland, so that many swiss citizens do not live where their families originated once any longer. When Switzerland's flag was officially introduced in 1848 to mark a new age (modern federal constitution!), there was quite some opposition and many citizens wanted to stay with their cantonal flags.
I have not attempted to count flags in gardens - there are thousands of them all over Switzerland - but according to what I see when walking around in different regions of Switzerland, I would estimate that today more than 90% of the single flagposts in the country will carry Switzerland's national flag, while cantonal and local flags are placed on additional flagposts, if at all.