def _count_families(pg_data: dict) -> dict:
    """
    Aggregate counts for the homolog families in the pangenome
    Args:
        pg_data: workspace data object for the Pangenome
    Returns:
        dict matching the type FamilyReport from PanGenomeAPI.spec
    """
    counts = {
        "families_count": 0,
        "homolog_families_count": 0,
        "singleton_families_count": 0,
    }
    counts["families_count"] = len(pg_data["orthologs"])
    for family in pg_data["orthologs"]:
        count = len(family["orthologs"])
        if count == 1:
            counts["singleton_families_count"] += 1
        elif count > 1:
            counts["homolog_families_count"] += 1
    return counts