add script to append message counter to events