JSFiddle - React, Tailwind, and code Playground

HTML

<input name="sel[]" value="1"/>
<input name="sel[]" value="2"/>

JavaScript

$(function(){
    $('body').append('<br/><br/>'+$('input[name=sel[]]').length)
})