Use count instead of self to generate different classes.