title: Count attributes with certain value xPath
body: <p>Currently i'm trying to count the total of items that are selected with xpath. </p>
  
  <p>to count all items i can do:</p>
  
  <pre><code>count(/process_data/formData/xdp/datasets/data/Data//@selected)
  </code></pre>
  
  <p>but how can i count all items where the value of selected is true. (not knowing the previous node). If i knew the previous node i could do:</p>
  
  <pre><code>count(/process_data/formData/xdp/datasets/data/Data//node[@selected=true]/@selected)
  </code></pre>
  
  <p>but since i don't know this data, i can't use this. any ideas?</p>