I used this article to find some information about pirate-attacks:
http://www.brighthub.com/engineering/marine/articles/64432.aspx
Pirates usually attack at night or in the early morning. It's very hard to spot a low-profile speed-boat under those conditions.
Consider the difficulty British merchants/escorts had during the early years of WWII to visually spot German submarines attacking from the surface at night - and it was not for lack of trying. They eventually solved it with the introduction of radar, but those pirate-boats make far worse radar reflectors than an all-metal conning tower.
To learn how to targetshoot with a machinegun, yes. But pirates attack from multiple directions. While you shoot at one, another may board you from the other side.
So you also have to learn how to perform a coordinated defense, and possibly close quarter fighting. At night.
Of course these sailors neither signed up nor get paid to risk their lives in a gunfight. Nor will they be motivated by the fact that pirates tend to be murderously vicious towards crews that offer lethal resistance.
You miss the point.
We don't send lots of expensive warships to Somalia to protect a few dozen poor Filipinos from being taken hostage. We do it to protect the ships and the cargos.
Small crews of poor Filipinos are merely the cheapest way to get a ship and its cargo from A to B.
Quite frankly, if you believe you have a cheap, easy solution to protect merchants effectively against Somali pirates, there are two possibilities: Either your idea is so brilliant it escaped everyone in both the shipping-industry and the navies involved, or something escaped you.