How many prime numbers are known?

Solution 1:

Nobody's really keeping count.

Newly discovered large primes make the news, but primes in the range of, say, a few hundred digits are not something that anybody keeps track of. They are very easy to find -- the computer that's showing you this text is likely capable of finding at least several ones per second for you, and with overwhelming probability they will be primes nobody else have ever seen before.

There are very many hundred-digit primes to find. We could cover the Earth in harddisks full of distinct hundred-digit primes to a height of hundreds of meters, without even making a dent in the supply of hundred-digit primes.

This also raises the question of what it means that a prime is "known". If I generate a dozen hundred-digit primes and they are forgotten after I close the window showing them, are these primes still "known"? If instead I print out one of them and save the copy in a safe without showing it to anybody, is that prime "known"? What if I cast it into the concrete foundation for my new house?

Solution 2:

In order to get a rough estimate, I checked performance of PrimeQ function in Mathematica on my computer. It appears, that in order to calculate all primes up to $10^n$ using this function, I need $\approx11^{(n-6)} \mathrm{seconds}$ on my single core of amd athlon 7750. Then it would take me for example $\approx1500$ years to calculate all primes up to $10^{16}$, and as a result I would get $10^{14}$ primes.

As @Henning Makholm said

Nobody's really keeping count (of prime numbers).

It is probably because it is more efficient to calculate them when needed than to store them. And since for cryptography, only very large primes are important, no one really needs those small ones.