One touch is not enough
Inside each leaf-trap of a Venus flytrap are small trigger hairs. Touch one hair and the trap stays open, only getting ready. A second touch, within roughly 20 seconds of the first, makes the two lobes close, typically in about a tenth of a second.
Wikipedia describes this as the plant remembering for a few seconds that a hair has been touched. Each touch sets off an electrical signal called an action potential, and two of them close to each other in time are what snap the trap shut.
Then it keeps counting
Closing is only the start. A struggling insect keeps brushing the hairs, and each brush sets off another signal. In 2016, Böhm and colleagues reported that the plant counts these signals. The number decides how strongly it responds.
Digestion is not switched on straight away. The paper reports that about five signals were needed before the genes for digestive enzymes and for taking up nutrients were switched on in a significant way. Its authors describe making those enzymes as costly for the plant. Wikipedia says the counting works as a safeguard against wasting energy on objects with no nutritional value.
What the count tells the plant
The researchers say the number of signals tells the plant about the size and nutrient content of the struggling prey. The plant can then weigh the cost of hunting against the benefit, and it makes more digestive machinery when the meal seems worth it. A creature that keeps moving gives a high count. A brief twitch does not.
The exact numbers are worded a little differently from source to source. The paper's summary says more than three signals, while its results and discussion say about five. Wikipedia says five in total. 'About five' is the safe way to put it.
