setting number of messages