def squares_won(microboard, player):
    """
    Return the number of squares won by the player on the microboard.
    """
    return sum(map(lambda line: line.count(player), microboard.export_grid()))