Working with intermittant error in counting (off by a couple digits). Although working this is some of the worst C code ever written. Clean-up is necessary