validate min and max count