def count_first_choices(tally):
    """
    Return dict giving count of all first choices in tally dictionary.
    
    Args:
        tally (dictionary): dictionary mapping ballots to nonnegative reals.
        
    Returns:
        (dict): dictionary mapping all choices that occur at least once
            as a first choice to count of their number of choices.

    Example:
        >>> tally = {('a', 'b'):1, ('c'):1, ():1, ('d'):1, ('a'):1}
        >>> count_first_choices(tally)
        {'a': 2, 'c': 1, 'd': 1}
    """

    d = dict()
    for ballot, count in tally.items():
        if len(ballot)>0:
            first_choice = ballot[0]
            if first_choice in d:
                d[first_choice] = count + d[first_choice]
            else:
                d[first_choice] = count
    return d