I am a part of a group interested in measuring some aspects of the software maintained by the Debian project. For now, we are mainly counting the number of physical source lines of code (SLOC) of several Debian distributions.
We have written a paper, "Counting potatoes: the size of Debian 2.2" (also available in PDF). This is an excerpt of the abstract:
"[...] we use David A. Wheeler's sloccount system to determine the number of physical source lines of code (SLOC) of Debian 2.2 (aka potato). We show that Debian 2.2 includes more than 55,000,000 physical SLOC (almost twice than Red Hat 7.1, released about 8 months later), showing that the Debian development model (based on the work of a large group of voluntary developers spread around the world) is at least as capable as other development methods [...] It is also shown that if Debian had been developed using traditional proprietary methods, the COCOMO model estimates that its cost would be close to $1.9 billion USD to develop Debian 2.2. In addition, we offer both an analysis of the programming languages used in the distribution (C amounts for about 70%, C++ for about 10%, LISP and Shell are around 5%, with many others to follow), and the largest packages (Mozilla, the Linux kernel, PM3, XFree86, etc.)"
Versions of this paper have been published in Upgrade Magazine, vol.II, issue no. 6, December 2001 (available online), in English, and in Novatica, issue no. 154, nov-dic 2001 (available online), and in IV Congreso Hispalinux, Madrid, Spain, November 2001 (available online), both in Spanish. The reader can observe slight differences between the numbers offered in different versions of this paper, due to different versions of the tools used to do the measures, which are always in the process of improving their accuracy.
Some raw data, with the details of the numbers shown in the paper, is available. They are mainly the final reports produced by SLOCCount, the toolset used for counting the source code (already available as a package for Debian unstable).
Older versions of this paper are version 0.2 (October 2001).
The reader interested in SLOC counts of Linux-based distributions will probably enjoy (as I did) "More Than a Gigabuck: Estimating GNU/Linux's Size", by David A. Wheeler.