Questions like that are difficult to answer because statistics are not really kept very well (sometimes for political reasons, sometimes due to pure bureaucracy).
There is a term called "defensive gun use" which is used to mean a situation where you are attacked or under threat and use a firearm to defend yourself. This does not strictly mean that you fire it. If someone threatens to steal your car and you draw a weapon and they flee, that would also be a defensive use. Thing is, it is very hard to find statistics for. One study I saw suggested that victims of direct crime used a firearm in something like 1% of cases. Some sources claim that it happens far more often, but they are often suspect.
You can look at it this way: Lets say that 1000 people who own a gun get robbed in one year in some town.
How many of those people are surprised by the attack and can't react?
How many of them are in a position or situation where they can't physically get the weapon and ammunition?
How many of them are ultimately not willing to kill a human being over their wallet?
Once you factor those in, there's probably only a handful left.
In the US, robbery rates (to use one kind of crime) are something like 75 per 100.000 people. Its probably not that out of the ordinary to assume that only 1 or 2 of those 75 meet all three conditions.
Straight up shoot outs (as in two people trading shots) are very rare and usually hit the news when they occur. If you start shooting at me, I am either going to be bleeding on the ground, running away or trying to do both. I am definitely not coming back to see if you want to continue shooting at me
One factor that is worth discussing here though, because it was completely alien to me as a Dane where we have no big wildlife, is that if you live in a really rural place (and a lot of places in America are VERY rural) carrying a weapon or very strong mace (canned pepper spray or tear gas basically) is often recommended for fear of things like mountain lions, bobcats, rattle snakes and so on. Its also pretty common for farmers in desert areas to have rifles or shotguns for fending off coyotes that might attack sheep and other livestock animals.