def eliminate(problem, location, listOfLocations):
    """
    Given a list of locations, eliminate from the problem the number that is
    present at the `location`.

    :param list problem: Two-dimensional list of sets
    :param tuple location: Location with the number to be removed
    :param list<tuple> listOfLocations: List of locations to have the number
                                         removed
    :return: Count of eliminations
    :rtype: int
    """
    loc_r, loc_c = location
    number_set = problem[loc_r][loc_c]

    # Don't perform any elimination if the location contains more than a number
    if len(number_set) != 1:
        return 0

    number = next(iter(number_set))

    count = 0
    for loc_remove in listOfLocations:
        if loc_remove == location:
            continue

        loc_r, loc_c = loc_remove
        if number in problem[loc_r][loc_c]:
            problem[loc_r][loc_c] = problem[loc_r][loc_c] - number_set
            count += 1

    return count