from typing import Counter


def sum_dicts(a, b):
    """Merge dictionaries, summing their values.

    For example:
        a = {"x": 1, "y": 1}
        b = {"x": 1, "z": 1}
        returns {"x": 2, "y": 1, "z": 1}

    Args:
        a (dict)
        b (dict)

    Returns:
        dict
    """
    return Counter(a) + Counter(b)