added some counting function on the DataSet class