'Count the number of lines of data in dataset,
skipping all blank lines and comments.'

def count_data_lines(self, dataset):

    data_lines = 0
    for line in open(dataset.file_name):
        line = line.strip()
        if (line and (not line.startswith('#'))):
            data_lines += 1
    return data_lines
