At least a few insects have nociceptors, cells that detect and transmit sensations of pain. This was discovered in 2003 by studying the variation in reactions of larvae of the common fruitfly Drosophila to the touch of a heated probe and an unheated one. The larvae reacted to the touch of the heated probe with a stereotypical rolling behavior that was not exhibited when the larvae were touched by the unheated probe. Although nociception has been demonstrated in insects, there is no consensus that insects feel pain consciously

How many insects have nociceptors?