Count occurrences of each symbol in a file