def num_examples(dataset, example_type):
    """
    Counts num. positive (1) or negative (0) elements of dataset.
    """
    examples_list = []
    for element in dataset:
        if element[1] == example_type:
            examples_list.append(element[1])
    return len(examples_list)