There is no way, to know, how a private key was generated. That is just not possible. Unless we are using your favorite tool: magic.
First, a quote on magic: "Any sufficiently advanced technology is indistinguishable from magic."
So, let's start with what we know:
- The number of freely and easily available software packages that will generate a key for you
- The release dates of these
- The number of hardware devices that will do the same
- The release dates of these
- The number of total unique bitcoin addresses at each of the dates above
From that, I think we can establish a lower and an upper bound... and make a real good guess so as to the vulnerability of each wallet.
Which is, in my opinion, better than that bad guy in "The Matrix"'s favourite tool: Ignorance.
So, how do you calculate the amount of private keys from people who role dices to make them. How do you count the people who let their cat run over their keyboard to generate it? There are a lot of possibilities to create private keys, without even software.
Your last point is just stupid: Used Bitcoin addresses and generated private keys are just not the same thing.
So, yes you can collect some data, and make a guess, but it wouldn't be a good one.