title: Using XPath count() with contains()
body: <p>I am working with the following (suboptimal) XML:</p>
  
  <pre><code>&lt;a&gt;
    &lt;b&gt;
      &lt;c&gt;X:1 Y:0&lt;/c&gt;
      &lt;c&gt;X:1 Y:0&lt;/c&gt;
      &lt;c&gt;X:2 Y:0&lt;/c&gt;
    &lt;/b&gt;
    &lt;b&gt;
      &lt;c&gt;X:1 Y:0&lt;/c&gt;
      &lt;c&gt;X:2 Y:0&lt;/c&gt;
    &lt;/b&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I am trying to use XPath to count the number of <code>&lt;c&gt;</code> nodes whose contents contain <code>X:1</code>:</p>
  
  <pre><code>count(contains(/a/b/c, 'X:1'))
  </code></pre>
  
  <p>However, this returns an error rather than returning the expected count of <code>3</code>.</p>
  
  <p>What am I doing wrong?</p>