Time series regression
Counting of events is probably best done as a separate software component that takes the output of your event classifier. The event classifier model would output for each time-step two probabilities: one for started and one for stopped.

The easiest way to count the events to have a state machine that compares the probabilities against a fixed threshold to create discrete events. And once you have discrete events, counting is trivial. Pseudo-code below:

# returns a tuple with (new_state, event_name)
# event_name can be None if no event occurred
def next_event(state, start_prob, stop_prob):
    start_threshold = 0.5
    stop_threshold = 0.5

    if state == 'running':
        if stop_prob &gt; stop_threshold:
           return ("parked", "stop")

    if state == 'stopped' or state == 'unknown':
        if start_prob &gt; start_threshold:
           return ("running", "start")

    return (state, None) # no change

...
# initialization
start_counts = 0
state = 'unknown'

...
# for every new time window X
   event_prob = model.predict(X)

   state, event = next_event(state, event_prob[0], event_prob[1])
   if event is not None and event == 'start':
        start_counts += 1
   ....