As above, the 9/10 section is a less expensive way of "taking the average of the last 10 samples"...
Nice in case a GTS or encoder vibrates across a transition, which results in a few phantom pulses. It won't cause a huge reaction in your system.
The HZ is a scale factor for the 26ms cycle period. The parameter for setting velocity is in pulses per second, so muliplying by HZ will convert from pulses per cycle to pulses per second.