working on some js stuff

trying to get a function for refreshCount