I apologize for the delay.
Good questions. There are no hard numbers on the percentage of animals that have or get fleas or the percentage of animals that have or get worms.
However, the vast majority of puppies acquire worms from their mother when they are young or in utero. It's so prevalent we just assume it. As adults, it is quite common to get it from the environment. Basically, another dog with worms will poop and in that poop will be microscopic stages of worms and then another dog will come along and ingest them. The cycle goes on from there.
Fleas are a different story as they can be acquired directly from other animals(cats, dogs, coyotes, raccoons, etc...) or from the environment where that animal has shed them.
There are actually two great websites that will give you the most accurate information that is currently available. The information isn't perfect since vets and public health do not track fleas or worms. Some of the labs have so they have put their data in.
I would say these are the most accurate depictions of prevalence you will find anywhere. The second link is from Banfield Hospitals. They are a large group of hospitals in the US.
It does matter if they are indoor vs outdoor dogs. It is logical that the more time a dog spends outside the more likely they are to come across fleas and worms. It does not mean that people that take their dog outside are bad people. The same logic follows for humans. The more time you spend outside the more you are likely to get worms or come in contact with fleas or lice etc...