Here is a link to security bulletin for year 2005 issued by US-CERT. The bulletin shows the number of vulnerabilities in Windows, Unix/Linux, and other OS. Here is the result in short:
There were 5198 reported vulnerabilities: 812 Windows operating system vulnerabilities; 2328 Unix/Linux operating vulnerabilities; and 2058 Multiple operating system vulnerabilities.
This can break the myth that open source is secure because of it is nature. It also shows that if enough efforts are taken more secure code can be produced. Microsoft spent a lot of time from 2000 to now improving it is code’s security. Tools like PreFAST, compile time option /GS, managed code and many others brought us a more stable and secure OS no matter what ‘penguin’ fans say.