JSFiddle - React, Tailwind, and code Playground

HTML

<form id="foo">
    <input type="text" />
    <input type="text" />
    <input type="text" />
    <input type="text" />
    <input type="text" />
</form>
<p></p>

JavaScript

(function () {
    var els = $('#foo')[0].elements, $els;
    $els = $([]).add(els);
    $('p').html($els.length);
})();