JSFiddle - React, Tailwind, and code Playground

HTML

<div class="item">
   <span class="count"></span>
   Text that needs to be wrapped.
   &nbsp;
</div>

<div class="item">
   <span class="count"></span>
   Text that needs to be wrapped.
</div>

<div class="item">
   <span class="count"></span>
   Text that needs to be wrapped.
</div>

CSS

.item {color: Black}
.new {color: Red}

JavaScript

$('.item').contents().filter(function(){
    return this.nodeType == 3 && $.trim(this.nodeValue).length;
}).wrap('<span class="new" />');