Export to files and do uniq count