<h2 id="count"></h2>
#count { font-size: 30px; }
let countBox = document.querySelector('#count');
let count = 0;
let num = 1234567890;

let counting = setInterval(function () {
    if (count >= num) {
        count = num;
        clearInterval(counting);
    } else {
        count += 12345678;
    }
    countBox.innerHTML = new Intl.NumberFormat().format(count);
}, 10);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.