Implements an AutoIncrement counter class similar to PostgreSQL's sequence.