I have arrays of radio buttons in my view
<input type="radio" id="s20" name="radio[1]" value="5" { { old('radio.1') ? checked="checked" : '' } } />
...
I need to get their count to pass it to a my PostRequestValidator via <input type="hidden" value="count" name="count" />
I suppose the number of inputs are not known at priori, but there are many ways to do it.
The easiest way is counting them using JavaScript or jQuery to update the value field of the hidden input.
$("input[type=hidden][name=count]").val(
$("input[type=radio]").length
);
Obviously you can select those elements in better ways (using their name or class).