def count_data(data, code = None):
	"""Helper function that counts the number of data points in an arbitrary list of lists"""
	if isinstance(data,list):
		sum = 0
		for d in data:
			sum += count_data(d, code=code)
		return sum
	if data != '' and data != 'NA':
		if code == None or data == code:
			return 1
	return 0