I'm just wondering how the person who posted the answer was able to figure it out.
It's just putting basic batch stuff together. They knew these things:
1. This is an example of batch string replacement:
%string:.= % It means "the variable %string%, with each period (dot) changed to a space"
2. The replacement makes
17.09.01.04.03 become
17 09 01 04 033. A simple FOR command repeats once for each space-separated token
4. The variable %count% is set to 0 (zero) at the beginning.
5. Each time FOR repeats, the set /a count+=1 adds 1 (one) to the value of %count%
6. At the end, %count% is equal to the number of tokens.