Enum counter added

Use last enum value as the enum counter.