protected function isValid($value)
    {
        if (!is_array($value) && !($value instanceof \Countable)) {
            $this->addError('The given subject was not countable.', 1253718666);
            return;
        }

        $minimum = intval($this->options['minimum']);
        $maximum = intval($this->options['maximum']);
        if (count($value) < $minimum || count($value) > $maximum) {
            $this->addError('The count must be between %1$d and %2$d.', 1253718831, [$minimum, $maximum]);
        }
    }