The common knowledge that bees die when they sting is much more complicated than that. The rule only really applies to one type of bee, the Honey Bee. They have barbed stingers and stinging mammals with tough skin will cause them to lose their stingers and die. Against anything with thinner skin, or things such as insects, stinging will not kill them.
Just for reference, there are more than 20,000 types of bees.
