This is a modular counter that will add digits as it rolls over. The schematic includes a sample counter that is ticking away.
Import this schematic in Spawn chunks with the schematic min x, y and z at at X = -128, Y = 225, Z = 233. I added a single block in the schematic to help you establish this anchor.
To use it, copy the '0' digit where you want the counter and drive it by passing a redstone signal as demonstrated in the sample.