I don’t have time to track down the other posts right now, but this is the way it is designed to work. Formulas, including a simple field or variable, are considered true false values. Zero is false, everything else is true. Since NumParts has a value of 2, it is true, and the condition for ending the loop has been met.
This is not the way Panorama 6 worked, but Jim considers that to be a bug in Pan 6, and contrary to its documentation.