Linux currently has around 30 million lines of code I believe.
> The development effort for 5ESS required five thousand employees, producing 100 million lines of system source code, mostly in the C language, with 100 million lines of header files and makefiles.
Granted, this section is suspiciously citation-free, so it's fair to take it with a grain of salt.
As for windows, I'm fairly certain that more devices run the linux kernel than Windows as well.
And it looks bigger than Linux by its repo size:
> the Windows code base is approximately 3.5M files and, when checked in to a Git repo, results in a repo of about 300GB. Further, the Windows team is about 4,000 engineers and the engineering system produces 1,760 daily “lab builds” across 440 branches in addition to thousands of pull request validation builds.
https://devblogs.microsoft.com/bharry/the-largest-git-repo-o...
It should be the world's largest collaboration project on Earth, by the number of contributing companies.