title: Can I get xpath count value in robot framework
body: <p>Assume the following XML:</p>
  
  <pre><code>&lt;data&gt;
      &lt;node id="1" /&gt;
      &lt;node id="2" /&gt;
      &lt;node id="12" /&gt;
      &lt;node id="16" /&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>This xpath expression should be valid:</p>
  
  <pre><code>count(//node)
  </code></pre>
  
  <p>.. and should produce the number 4</p>
  
  <p>I'm new to robot frameworks. Is it possible to use this xpath in robot framework?
  for example something like:</p>
  
  <pre><code>${value}=  Get something something   source=${xml}    xpath=count(//node)
  </code></pre>
  
  <p>The one below works but I would like the xpath to produce the end value, not a list.</p>
  
  <pre><code>@{nodelist}=         Get Elements    ${xml}  xpath=node
  Length Should Be    ${nodelist}      4
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I know that I can count the nodes in a list of nodes. However, I would like to get the absolute value (integer or string) using xpath. Now I need to write different code depending on if the xpath result is a node, list or attribute when the xpath could theoretically produce the final value. </p>