Why are they numDuchiesCards instead of numDuchies, like the others? Duchy is name of card, not a type.
There are some private data members we don't know about, that increment the number of Duchies in the kingdom that your deck represents as you buy more cards. For instance, if you buy both a Farming Village and a Market, that combination of economy and commerce expands the your numDuchies to 2 as the imaginary kingdom represented by your deck inevitably expands due to that robust development. The Duchies are stored as a linked list of complex objects, each one has a name, the one generated by your Farming Village and Market might, for instance, be called "Nottingham". It also has data about the people that live there, like Beatrice, who was born on a cold winter the same year her father was Swindled out of his Woodcutting business and had to take up the dirty act of Smuggling just to get by, and she works in the Farming Village now that she has grown older, and sells her goods for whatever she can get in the Market. She has some pointers that correspond to men she is attracted to in your opponent's Duchies, but crossdeck romance is forbidden, so these pointers are never used. It is a deep metaphor for the things we want but cannot have. Eventually she marries the new Woodcutter from the same kingdom and they exchange some data.
Once the game is over, all this data is destroyed and there is no way to view any of it. However, you are all benefiting from a rich backstory from the growing Duchies mechanic in ways you can't possibly understand, and it adds meaning and substance to your dominion games.
This is totally unrelated to the number of Duchy
cards in your deck, which is totally different, those are worth VP, so they have to be named differently. That's just good coding.
Now you guys know, the code is fine, you just don't have the big picture.