Wait which version of Windows are you comparing it to? If Windows XP then be sure to compare XP to OS 9 or the original OS X.
If the latest windows 10 vs latest OS X then Windows 10 has less vulnerabilities as of today.
Are you certain? OS X is a package of UNIX utilities that are included with it and the vulnerabilities attributed to OS X include all of the vulnerabilities of those utilities as well.
Windows 10 has been getting a lot of bad press lately for flaws. . . Perhaps it is solid, but it has yet to be really tested by fire in the wild by millions of idiots using it. Until it passes the idiot test, it really cannot be said to be idiot proof. It's the same for each new version of OS X and iOS. What smart programmers may THINK they've made bullet proof seldom survives contact with idiots.