JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>Row <input name="test[]" value="First"/></li>
    <li>Row <input name="test[]" value="Second"/></li>
    <li>Row <input name="test[]" value="Third"/></li>
</ul>
<p></p>

JavaScript

var count = $("input[name='test[]']").length;
$("p").html('The count of the list items is '+count);