Would something like this work?
Create a group and add a local variable.
set the local variable to tokencount(text.text,",")
repeat tokencount times
system compare two values : tokenat(text.text, local variable, ",") = 7
else - system subtract 1 from local variable
ok, I made an error here, I'm sure, but it should be something along the realms of this.