COUNT = 1 def process(data, pulse_id, timestamp, params): global COUNT COUNT=COUNT+1 ret = {} ret["count"] = COUNT return ret