Method to find and count names. Read to and write from csv files