I'm just going to sound more callous and clarify that I didn't mean mass shootings just the kind of robberies shown in the article.
As another data point, a Harvard University analysis of a National Crime Victimization Survey concludes that people defended themselves with a gun in almost 0.9% of crimes from 2007–2011: https://www.sciencedirect.com/science/article/abs/pii/S00917...
Guns were used in self defence in 0.9% of crimes where the victim of the crime was present. It doesn't state whether the gun was fired or not but given the low percentages of a gun being involved at all I guess there aren't many 'bad guys' being shot (or shot at).