If you want to store count result in header, why you use filtering? This should work:
<setHeader headerName="itemCount"> <xpath resultType="java.lang.String">count(/order/item)</xpath> </setHeader> <log message="${header.itemCount}"></log> -- View this message in context: http://camel.465427.n5.nabble.com/Node-count-in-camel-tp5716946p5716966.html Sent from the Camel - Users mailing list archive at Nabble.com.