fdIn = open('CPUSpeed.txt', 'r')
fdOut = open('CPUSpeed_count.txt', 'w')
#fdIn = open('NumCores.txt', 'r')
#fdOut = open('NumCores_powerof2.txt', 'w')

first = False
count = {}
for line in fdIn:
    if first == False:
        first = True
        continue
    #if int(line) in [1, 2, 4, 8, 16, 32, 64, 128, 256]:
    #    fdOut.write(line)
    tmp = line[:-1]
    if tmp in count: count[tmp] += 1
    else: count[tmp] = 1
fdIn.close()
for i in count: fdOut.write(i + '\t' + str(count[i]) + '\n')

fdOut.close()
