In Brian Conrey's article on Riemann's hypothesis, one reads in the very beginning:
On Christmas Eve 1849 Gauss wrote a letter to his former student Encke in which he described his thoughts about the number of primes π(x) less than or equal to x. Gauss had developed his ideas around 1792 when he was 15 or 16 years old. His conclusion was that up to a small error term π(x) was close to $li(x)$ the logarithmic integral
$$li(x) = \int_2^x \frac{dt}{log\ t}$$
The strikingly good approximation was computed over and over by Gauss at intervals up to 3 million, all computed by Gauss himself who could determine the number of primes in a chiliad (block of one thousand numbers) in 15 minutes.
Is it known how Gauss could do that: determine the number of primes in up to 3,000 chiliads, which must have taken him 750 hours. What was his trick? And were his numbers correct or just good estimates?