Looking at your code I do not see the IRQ routine "ClockCount".