Use the JavaScript setInterval () :
var contador = document.getElementById('contador');
var TOTAL_CLIENTES = 10;
var intervalo = setInterval(function() {
contador.innerHTML = parseInt(contador.innerHTML, 10) + 1;
if (contador.innerHTML == TOTAL_CLIENTES) {
clearInterval(intervalo);
}
}, 500);
<p>Clientes cadastrados: <span id="contador">0</span></p>
The above code will increment the value of <span>
by 1 every 500 milliseconds. You can change the increment interval as you want, leave it faster or slower.
TOTAL_CLIENTES
is your value from PHP:
var TOTAL_CLIENTES = <?php echo $admcadastros; ?>;