def duplicate_count(text: str) -> int:
    """Counts amount of duplicates in a text.

    Examples:
        >>> assert duplicate_count("abcde") == 0
        >>> assert duplicate_count("abcdea") == 1
        >>> assert duplicate_count("indivisibility") == 1
    """
    return len(
        set(item for item in text.lower() if text.lower().count(item) > 1)
    )