I've read An Empirical Study of Operating Systems Errors [720k PostScript] by a group of Stanford Scientists. It says that OpenBSD 2.8 has a factor 1.2 to 6 times higher number of bugs than Linux kernel 2.4.1. Section 7 of that paper explains why and where, but lacks detail. Recommended reading.
And don't feel bad if you skip the statistical analysis parts.