a ver prueba con esto:
Código HTML:
Ver original<script type="text/javascript"> jQuery(function($) {
var ini_counter0 = parseInt($('#totaldownloads').html());
var fin_counter0;
$.get('data.php?i=0', function(data) {
fin_counter0 = data;
$('#totaldownloads').countTo({
from: ini_counter0,
to: fin_counter0,
speed: 1000,
refreshInterval: 50,
onComplete: function(value) {
console.debug(this);
}
});
});
});