Здесь находится решение Pythonic, использующее Counter класс модуля collections, который будет подсчитывать количество вхождений каждого элемента в итерируемый:
#!/usr/bin/env python2
import collections
with open('file.txt') as f:
names = []
for line in f:
names.append(line.strip().split()[0] + ' ' + line.strip().split()[2])
result_dict = collections.Counter(names)
for person in result_dict:
print person + ' ' + str(result_dict[person])