Venus flytraps can “count.” When an insect contacts one of the triggering hairs between its hinged leaves, the trap prepares to close, but it won’t do so unless a second contact occurs within about 20 seconds. This spares the plant from wasting energy shutting on raindrops and other nonliving stimuli.
The plant will release a cocktail of prey-decomposing acidic enzymes after five stimuli, enough to “convince” it that it’s caught a creature worth consuming.
(Jennifer Böhm et al., “The Venus Flytrap Dionaea muscipula Counts Prey-Induced Action Potentials to Induce Sodium Uptake,” Current Biology 26:3 [Feb. 8, 2016], 286–295.)