sending data from the processes to the main process once the word counting is done