Assuming column A has the values and B1 is set to 0. You just need in B2… =IF(A2>A1,B1+1,B1)
And then fill down. If you want the total, take the max of column B. Count is just =ROW() in this simple case or use the count function if you think someone will insert rows above.
If the goal is just one cell, then use sum as an array formula
={SUM(—-(A1:A1999<A2:2000)}
Or use IF in a similar manner, there’s probably dozens of ways to do this. If it were more complicated, sumproduct could be used which has a summing reduce built in. And I’m sure that excel’s Arrays could serve the purpose of the Pair that was invented here, if that is really needed.
My point here isn’t to poke holes in the fun exercise but to emphasize how excel’s dynamic programming makes these problems easy solvable by just about anyone. I don’t see a future where everyone is complaining about their coworker not using currying in their latest spreadsheet.