The invention is a Gray code counter that uses a carry chain to determine the state of each bit of the counter. An additional bit that toggles at every clock is used to originate the carry chain, and to determine the counter direction. Then, a generic Gray count bit module is used to process the carry and count chain for each bit of the counter. Special consideration is given to the first and last bits of the counter to ensure correct termination and reset of the counter. A one bit gray code generic module is described such that a scalable counter can be generated recursively.