Register the number of steps done in 'state' for 'p'
step_stat(p, step = 0, ...)
p
step
...
additional args to pass
None