There are more than 600 species of carnivorous plants, but the Venus flytrap ( Dionaea muscipula ) is the most iconic. This plant traps insects in its jaws to make up for the few nutrients that make up for the few nutrients they acquire from their soil.
The plant naturally does not have eyes to know if what it is trying to eat is an insect or not: it could be a piece of leaf, or some other debris. So how do you ensure that the prey is something nutritionally interesting?
Count the touches
As explained in this study , when an insect visits the trap and tilts the mechanosensors on the interior surface, the action potentials (AP) are triggered.
After a moving object stimulates two different points, the trap closes and cages the victim. The prey, trying to get away, repeatedly touch the sensor hairs and, for the next several hours, through the endocrine-based system the airtight trap is flooded with a cocktail of acidic enzymes that decompose the prey .

In order to know that the caged object is potential food and that resources must be spent activating the glands to decompose it, the plant takes into account how many times the sensor hairs are stimulated.
Through the application of a series of stimulations of the sensor hairs, in the cited study he found that the signaling pathway of the tactile hormone jasmonic acid (JA) is activated after the second stimulus , while more than three PAs are required to trigger a expression of genes that encode hydrolases that degrade prey, and that this expression is proportional to the number of mechanical stimulations.

That is, the closure of the mechanism is activated when the dam touches hairs twice in a period not exceeding 30 seconds . Then the trap closes in a matter of milliseconds.
A decomposing animal contains a sodium load, and these sodium ions enter the capture organ through the glands. There is a sodium channel DmHKT1 responsible for this acquisition of sodium , and the number of transcripts expressed depends on the number of mechanoelectric stimulations. Thus, the amount of PA that a victim activates when attempting to escape the trap identifies the moving prey as a Na + rich animal struggling to escape, as well as highly nutritious food for the plant.
More recently, another study carried out by the University of Zurich, in Switzerland, has found that a single slow touch also causes the trap to close . Specifically, slowly touching a sensor hair only once can also generate both signals and thus lead to the closure of the trap.