def get_total_categories(studios):
    """Gets total category counts.
    
    Args:
        studios (array-like): a list of studios, either as MongoDB representations
            or as dictionaries.

    Returns:
        A dictionary mapping each category to a total block count.
    """

    categories = dict()
    for studio in studios:
        bc = studio["stats"]["total"]["block_categories"]
        for cat in bc:
            if cat not in categories:
                categories[cat] = 0
            categories[cat] += bc[cat]

    return categories