cpan.org shows 21,674 distributions, while rubygems.org shows 19,428 gems.
I'm not sure what they're scraping.
Maybe the good old RAA, too. I have no idea if the site controls for
multiple identical listings, or how the variants of Gems / modules are
counted (QT-Ruby exists for at least Qt 3 and Qt 4, would those count
as one gem or two gems? What about wxRuby? Rails? Etc.)
The metric itself is debatable, anyway. Different capabilities of the
standard libraries lead to different gems/modules, and several
gems/modules solve the same problem in different ways. Not to mention
if a module/gem is still actively maintained or not (and how would you
measure *that*?).
--
Phillip Gawlowski
Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.