#COMPTEUR et lecture du fichier conf
import csv
def DefReadConfRom(rom_config_file):
	reader = csv.reader(open(rom_config_file),delimiter=',')
	li = []
	emu = []
	GamePerEmu = []
	MAX = 0
	MAX_EMU = 0

	for row in reader:
		if row:
			li.append(row)
			if not (li[MAX][1] in emu):
				emu.append(li[MAX][1])
				MAX_EMU=MAX_EMU +1

			MAX = MAX +1
	def getKey(item):
		return item[1]
	sorted(li, key=getKey)

	#return {'MAX':MAX, 'MAX_EMU':MAX_EMU,'li':li,'emu':emu}
	return MAX,MAX_EMU,li,emu
