Best ask Microsoft that, but it's harder than you think to get an accurate number. There will be literally thousands of functions which will be in seperate files strewn al over the computer.
Quite frankly, I doubt that Microsoft will be bothered/willing to give you an answer. Just accept that there is a lot of lines to an OS.
If you were really desperate, most of the varients of Linux are open-source, so you could count them for yourself.