def layer_counts(layer):
    """counts the digits in a layer

    args: layer (a tuple of digits 0-9)
    returns: dictionary with keys 0-9, values are the frequency of the key
    """
    counts = {i:layer.count(i) for i in range(10)}
    return counts