added feature for knowing how many messages are being sent before they are actually sent