'Check a count against a maximum.
Unless maximum is -1 which indicates that there is no limit.'

@staticmethod
def _check_maximum(count, maximum, msg):

    if ((maximum != (-1)) and (count > maximum)):
        raise exception.StackValidationFailed(message=msg)
