Separates the file by white space and defined a function to print out the counts.