Hi Daniel & Catrin,

As a followup..

On 9 September 2011 15:12, Merlijn van Deen <valhallasw@arctus.nl> wrote:
It might actually be interesting to solve this in a more global way: a site_stats toolserver table that incorporates all site_stats values for all wikis.

I did exactly this: see u_valhallasw_p.site_stats_global on sql-s1. However, there is a slight issue here: 
 
I think the 20 million is based on Special:Statistics[1], which shows 'Content pages' (currently 3.7M on enwiki). This is the 'ss_good_articles' column in the site_stats table:
mysql> select sum(ss_good_articles) from toolserver.wiki as w left join u_valhallasw_p.site_stats_global as s on w.dbname=s.dbname where w.is_meta=0 and is_closed=0 group by is_closed;
+-----------------------+
| sum(ss_good_articles) |
+-----------------------+
|              50899768 |
+-----------------------+
1 row in set (0.48 sec)

So. 50 million, not 20 million. Even if we just take wikipedia into account...

mysql> select sum(ss_good_articles) from toolserver.wiki as w left join u_valhallasw_p.site_stats_global as s on w.dbname=s.dbname where w.is_meta=0 and is_closed=0 and family='wikipedia' group by is_closed;
+-----------------------+
| sum(ss_good_articles) |
+-----------------------+
|              33785183 |
+-----------------------+
1 row in set (0.14 sec)

Again, much more than 20 million... anyway, feel free to play with the site_stats_global table to get the numbers you need; it's not updated automatically. It takes about 5 seconds to update, so it could be updated quite regularly.

Best,
Merlijn

P.S. Some more global stats:
  3,021,285,140 edits on all non-meta wikimedia wikis
  2,478,927,229 edits on all non-meta open wikipedias
  142,927,813 pages on wikipedia
  271,005,298 pages on all non-meta wikis