I have a large string of text (variable) and i need to loop through it and count how many commas are in each group of the string. The string is in a variable ($string) and each group is surrounded in parenthesis (data, data, data).
so if
$string = (data, data, data), (data, data, data), (data...