JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://harvesthq.github.io/tick/tick/css/tick.css">
<script src="http://harvesthq.github.io/tick/tick/js/tick.js"></script>
<span class="tick tick-flip tick-promo">5,000</span>

JavaScript

$(document).ready(function () {
        startCounter();
    });

    function startCounter() {
        $('.tick').ticker({
            delay: 1000,
            incremental: 1,
            separators: true
        });
    }

    var myCounter = setInterval(function resetCounter() {
        var lsCurrentTick = $('.tick').find('.tick-new').text();
        
        if (lsCurrentTick > 5010) {
            $.fn.ticker.stop();
        }
    }, 1000);