Here's why:
* Collective nouns refer to a group of people or things as a single unit. In this case, "townsfolk" represents all the people who live in a town.
* Compound nouns are formed by combining two or more words. While "townsfolk" is made up of two words ("town" and "folk"), it functions as a single unit to describe the group.
Therefore, while it has elements of a compound noun, "townsfolk" is classified as a collective noun because it represents a group.