Código PHP :
<?php
$destino = "numero.dat";
$abrir = fopen($destino,"r");
$cuenta = trim(fread($abrir,filesize($destino)));
if ($cuenta != "") ++$cuenta;
else $cuenta = 1;
@fclose($abrir);
$abrir = fopen($destino,"w");
@fputs($abrir,$cuenta);
@fclose($abrir);
echo '{"count":"'.$cuenta.'"}';
?>
