Here's a link to an article published in the New York Times. While it deals mainly with piracy on an industrial scale, there is no doubt that the small time opportunist is emboldened by this style of activity.
That's what happens off the coast of Africa and in parts of Asia. Be extra careful. Try to sail in company with other boats, stay away from the coast where possible, maintain radio silence where possible: and understand the limitations and restrictions which come with carrying firearms on board your vessel