Cleaned up and commented CountPaths