Count entity infos and print to the correct outputstream.