JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Results</h1>
<hr />
<div class="Item">Item 1</div>
<div class="Item">Item 2</div>

<h2>No root</h2>
<div id="res1">
</div>
<h2>Body is root</h2>
<div id="res2">
</div>

CSS

h1{
 font-size:1.4em   
}

h2{
 font-size:1.2em  
}

div
{
 font-size:1em   
}

JavaScript

$(document).ready(function(){
    
    $("#res1").html($(".Item:not(:first)").length + " : " + $(".Item:not(.Item:first)").length);
    
    $("#res2").html($("body .Item:not(:first)").length + " : " + $("body .Item:not(.Item:first)").length);
     
});