def METHOD_NAME(family_id):
    """
    Return the number of types in a loaded family.
    """
    if isinstance(family_id, int):
        family_id = DB.ElementId(family_id)
    elif not isinstance(family_id, DB.ElementId):
        raise TypeError()
    family = revit.doc.GetElement(family_id)
    return len(list(family.GetFamilySymbolIds()))