def classCount(rows):
    """
    Counts the labels in list of rows
    :param rows:    Input rows
    :return:        Dictionary of labels with count as values
    """
    counts = {}
    for row in rows:
        label = row[-1]
        if label not in counts:
            counts[label] = 0
        counts[label] += 1
    return counts