7

Here is a purely functional solution (i.e. not using mutable state), based in FoldList (since the one based on linked lists has been already taken):
stepF =
Function @ With[{sum = First @ #1 + #2, len = #[[2]], prevsum = #1[[3]]},
If[sum > prevsum, {0, 0, sum, len + 1}, {sum, len + 1, pre...