setting the message count in confirmation email correctly