How to control the no of radio buttons which are displayed depending on the no: of italicized words in a tiddler

As discussed in this post, I am using markdown syntax for italics - astericks * * as the delimiter for clozes (for a spaced repetition system). By using CSS, I am hiding the italicized words so that it appear like a cloze (in the viewtemplate cascade for cloze review activated by ? button in the viewtoolbar)

Currently I have hard-coded 5 radio buttons in the template for cloze review (as seen in the image shown above). But I want the no of radio buttons displayed to automatically change depending on the no of italicized words in the tiddler. How to do this? Can someone help ? Here is the link for the cloze review template tiddler

Below given is the code for the radio buttons from that template tiddler

__''Cloze review''__

No:of clozes as per previous session: {{{ [<currentTiddler>get[text]split[*]count[]subtract[1]divide[2]] }}}
<br>
Clozes answered correctly :
<$tiddler tiddler=<<currentTiddler>> >
<$radio field="clozes-answered-correctly" value="0" actions=<<cloze-score>> > 0-clozes </$radio> &nbsp;
<$radio field="clozes-answered-correctly" value="1" actions=<<cloze-score>> > 1-clozes </$radio> &nbsp;
<$radio field="clozes-answered-correctly" value="2" actions=<<cloze-score>> > 2-clozes </$radio> &nbsp;
<$radio field="clozes-answered-correctly" value="3" actions=<<cloze-score>> > 3-clozes </$radio> &nbsp;
<$radio field="clozes-answered-correctly" value="4" actions=<<cloze-score>> > 4-clozes </$radio> &nbsp;
</$tiddler>

Any suggestions regarding this?

maybe something like this

<$list filter="0 1 2 3 4 5 6 7 8 9 +[limit[3]]" variable=n >
<$radio field="clozes-answered-correctly" value=<<n>> actions=<<cloze-score>> > <<n>>-clozes </$radio> &nbsp;
</$list>

Thanks @buggyj for the help. I modified the code as given below and now it’s working. Will need more testing to see whether there are any bugs

Clozes answered correctly :
<$tiddler tiddler=<<currentTiddler>> >
<$let
cloze-number={{{[<currentTiddler>get[text]split[*]count[]subtract[1]divide[2]fixed[0]]}}} >
<$list filter="[range[0],<cloze-number>]" variable="cloze-radio-buttons" >
<$radio field="clozes-answered-correctly" value=<<cloze-radio-buttons>> actions=<<cloze-score>> > <<cloze-radio-buttons>>-clozes </$radio> &nbsp;
</$list>
</$let>
</$tiddler>