What is the physical mechanism the Venus Flytrap exploits to time the interval between an electric signal and the following one?
Venus flytraps generally appear to decide and act based on leaky summation and an action threshold. Basically electrical spikes (action potentials) arrive at times $t_i$ and are summed into a membrane voltage or charge $\tau V'(t)=\sum_i \delta(t_i-t)-V$; when this reaches a threshold $\theta$ an action occurs. This is very similar to "integrate-and-fire" neuron models. Note that if signals arrive too slowly, the voltage has had time to decline and there is no chance to reach the threshold, while a quicker sequence can sum together and reach the threshold.
Flytraps close because of accumulating charge in the midrib, which activates closing cells when it gets about 13.63 µC . These charges arrive via action potentials from mechanosensory cells.
The "counting" used to determine whether to produce digestive enzymes works similarly, by summing sodium input from the prey. If it reaches the threshold the plant begins digestion .
 Volkov, A. G., Adesina, T., & Jovanov, E. (2007). Closing of Venus flytrap by electrical stimulation of motor cells. Plant signaling & behavior, 2(3), 139-145.
 Böhm, J., Scherzer, S., Krol, E., Kreuzer, I., von Meyer, K., Lorey, C., ... & Al-Rasheid, K. A. (2016). The Venus flytrap Dionaea muscipula counts prey-induced action potentials to induce sodium uptake. Current Biology, 26(3), 286-295.