You can use the Property Mediator [1] to achieve the above. So what you have to do is, in the first sequence set this property (let's say 'numberToPrint') and retrieve it in the second sequence as described in [1]. If the first sequence is calling the class though a class mediator [2], you can set the property inside the class itself (messageContext.setProperty(key, value)
).
[1] http://docs.wso2.org/wiki/display/ESB460/Property+Mediator