Linux isn't more secure because it is targetted less. It is more secure because it uses a different security model with a whole lot fewer holes in it; *nix in general has been designed to be secure and account for restricting one portion of the system from other portions since very early days. Windows started wide open, and remained wide open for a long time, a lot of system software was written to be wide open, and even more importantly, a lot of system concepts, like activeX, were not designed with security in mind. Consequently, Windows security, such as it is, is an afterthought layer that was added to the original functionality, whereas *nix security, specifically linux security, is built in at the bedrock level.
The fact is, it is a lot more difficult to hack a *nix system by design. Something else to note: A huge proportion of the servers out on the net are linux machines running apache. These machines are powerful (that's why they are servers), the tend to have big pipes (again, they're servers, they need relatively big pipes) they're online all the time (they're servers!) and so they are ideal for a botnet or a spamming system, etc. And so, the majority of spamming systems and botnets are linux machines, right? Because they're common and have the perfect set of capabilities for these tasks? No. Wrong. Most mal-servers are Windows machines. But why? All those many linux machines would be great mal-servers! They are a huge target! Well, the why is simple, and it's just what I said above: It is hard to hack a linux server, even one that isn't that well patched. A linux machine that is properly kept up to date is even harder. Macs are basically the same kind of hard target; they're *nix underneath.
The bottom line is that Windows has the malware because it has been the easy target. Not because it is the common target.