Overhaul program to create a more accurate count

Program has been overhauled to hopefully produce a more accurate daily count.  Still needs testing.