using modulos works nicely as well, instead of an alternate counter or numtok. Most likely (under certain circumstances) faster as well to check a mod of a number, then count the tokens in a string.

if ($calc(%i % $modespl) == 0) { ... }