It is possible to set a threshold for a line object and count the number of peaks (continuous profile sections above the threshold) and the number valleys (sections below the threshold).
For example, using peaks and valleys counter in the image below we can count the number of hot strings. Only full peaks and valleys are counted (each peak or valley must cross the threshold line twice). In our example there are 14 peaks and 13 valleys.
To set a threshold for a line object, click with the right mouse button on the object and select Threshold in the context menu. After that peaks and valleys are counted automatically and you can display them by selecting corresponding properties in the object label settings. Peaks and valleys counters can be also used in automation conditions.