title: Xslt size of token array (tokenize, number of tokens)
body: <p>Is there a way to getting the size of a token array after having run <code>tokenize($text, '\s+')</code>? Without running a loop.</p>
  
  <p>I miss Java in these cases where I can just run <code>list.size()</code>.</p>
  
  <p>Cheers</p>
  
  <p>Answer</p>
  
  <pre><code>&lt;xsl:variable name="tokens" select="tokenize($text, '\s+')"&gt;&lt;/xsl:variable&gt;
  &lt;xsl:value-of select="count($tokens)"&gt;&lt;/xsl:value-of&gt;
  </code></pre>