correct counter type in groovy scripts