import click


def _validate_count(value):
    """
    Validate that count is 4 or 5, because EFF lists
    only work for these number of dice.

    :param value: value to validate
    :return: value after it's validated
    """

    # Use `set` ({x, y, z}) here for quickest result
    if value not in {4, 5}:
        raise click.BadParameter(
            'Words in word lists limit number of dice to 4 or 5.'
        )

    return value