Count zero to one transitions

I am monitoring pump starts and have a Boolean that transitions from zero to one when a pump is running, so zero all the time the pump is off and one all the time the pump us running. I want to count how many times the pump started, i.e how many times it went from zero to one in any time period.
Is there any way to do this using Influx or Chronograf or Grafana standard functions?