OS X is less targeted, but it has nothing to do with market share which is a lot more than 5% at this moment in time. It is less targeted because it is much harder for hackers to write malware, spyware and viruses that can do any real harm. Hackers could give a wit about market share they only want to become famous for coming up with some destructive piece of software. Don't you think if some hacker could come up with a virus for OS X that would do the kind of damage that windows virus's have done in the past he or she would have done it for bragging rights? Not saying it can't be done but it has not happened yet.
The whole notion that hackers don't target OS X because not as many people use it is a load of dung. People always love to spout that same old line, but I don't ever remember anyone ever being able to back that up with anything more than opinion. I don't remember seeing some hacker poll on why they don't target OS X or linux. I have never seen anything that proves a market share to hacking is a direct correlation. At this moment in time there is far less spyware, malware, and viruses for OS X therefore it is certainly more secure and safe in that regard. However, that does not mean one should become complacent about it either. With that said, in all my years I have not once ever had to deal with clearing spyware or virus's from a mac. I do on windows machines all the time. So for the average home user os x is much more safe and secure.
Here is a good place to track viruses that are out. You wont find many for OS X if any.
http://www.wildlist.org/
If market share and hacking attempts, viruses and spyware were directly related then by whatever percent you think OS X has 2, 3, 5, 6 or 10 percent shouldnt there be that corresponding percentage of viruses on the Mac in these lists? Hmmmm? there is not and it is not even close.