Guns alone don't kill people (at least if they're not programmed to do so automatically), but as humans sometimes act irrationally, one could say if the population had less guns then there will be less deaths by gun shot.
The sole purpose of a gun is the kill/destroy more efficiently because knives and forks were not.
Nothing really has just one purpose. I admit that the person who built the weapon may have done so with the idea of killing in mind, but nobody can stop me using the gun to crack a nut or scare animals using a blank cartridge. Ultimately is a person (or a machine built as an extension of somebody's will) who points to something and pulls the trigger.