changed to generic counter type (default: unsigned int)