broke out count, read, update functions to files for AJAX