You could create a javascript function that loads a file every so many seconds to check if the number has changed. Saw a post about this somewhere...
function loadit()
{
var newscript = document.createElement("script")
newscript.type = "text/javascript"
newscript.src = "dothat.js"
document.body.appendChild(newscript)
}
Basically goes something like that. You can set that on a timer, have it change things depending on that loaded script... But the important part is having that newscript.src file to be generated by PHP.
There's your idea, let me know if you get it running, I'm curious to see something in working order with this method.