I have a \'signal\' series with 1 values (on), -1 values (off) and zero values:
signal = pd.Series([0, 1, 0, 0, -1, 0, 1, 1, 0, -1])
I need to return the numbe