public boolean isValidCount(int count) {
    if (isAll) {
      return false;
    } else if (exact != -1) {
      return count == exact;
    } else return count >= min && count <= max;
  }
Determine if the given count satisfies the required cardinality.

@param count  number of host groups containing component

@return true id count satisfies the required cardinality, false otherwise
ambari-server/src/main/java/org/apache/ambari/server/topology/Cardinality.java