This is largely inspired by SERVER-53303, where such a stat was added for the other stages that can spill ($group and $sort). Note that for window functions this would likely be the number of times that we write to the temporary record store, which may or may not be equivalent to the number of documents that get spilled.