Thank you for your post.
Change your URL to include concatenating a Calculation field. The Calculation field will fill in the counting information. If you have FileMaker Pro Advanced, you could create a Custom function to calculate the string. If not, then you'll have to force it. For example....
Let ( end=Get (FoundCount);
"d,4d89f9,0,0,12,0" & If (end > 0 ; "|d,4d89f9,0,1,12,0" ; "") & If (end > 1 ; "|d,4d89f9,0,2,12,0" ; "") & If (end > 2 ; "|d,4d89f9,0,3,12,0" ; "" ) & ....etc.
In essence, we check to see if the FoundCount is greater than certain values. When it isn't, it concatenates null strings, thereby finishing the number of repetitions.
Switching to the URL, substitute the text string by using the first part of the text string up to chm=, concatenating this calculation field, and concatenating that with the ending ("&chg=0,6.67,5,5" )
Let me know if you need clarification for any of the above steps.