RestartCount will be 0 for the initial execution of the step. If the step is restarted by a JobControlAction the RestartCount for the ExecutionHistoryStep created by the restart will be 1. Subsequent restarts in the same job execution will each increment the count.