Do note however that the only reason that Mac doesn’t has that many virusses is because only a few percent of the total computer market is using a Mac. If for example about 90% would be using a Mac then Windows wouldn’t have that many virusses.
p.s. Yes I also know the Unix core is more secure.