implemented MessageGateway.totalMessageCount()