title: How to count elements with two "restrictions"?
body: <p>My XML looks something like this :</p>
  
  <pre><code>&lt;books&gt;
      &lt;book id="b1"&gt;
        &lt;title&gt;Set theory and the continuum problem&lt;/title&gt;
        &lt;category&gt;Mathematics&lt;/category&gt;
        &lt;location&gt;
          &lt;area&gt;hall1&lt;/area&gt;
          &lt;case&gt;1&lt;/case&gt;
          &lt;shelf&gt;2&lt;/shelf&gt;
        &lt;/location&gt;
        &lt;description&gt;A lucid, elegant, and complete survey of set theory.&lt;/description&gt;
        &lt;history&gt;
          &lt;borrowed by="m4"/&gt;
          &lt;borrowed by="m2" until="2018-04-05"/&gt;
        &lt;/history&gt;
      &lt;/book&gt;
      &lt;book id="b2"&gt;
        &lt;title&gt;Computational Complexity&lt;/title&gt;
        &lt;isbn&gt;978-0201-530-827&lt;/isbn&gt;
        &lt;category&gt;Computer Science&lt;/category&gt;
        &lt;location&gt;
          &lt;area&gt;hall1&lt;/area&gt;
          &lt;case&gt;3&lt;/case&gt;
          &lt;shelf&gt;3&lt;/shelf&gt;
        &lt;/location&gt;
        &lt;description&gt;.&lt;/description&gt;
      &lt;/book&gt;
      &lt;book id="b3"&gt;
        &lt;title&gt;To mock a mockingbird&lt;/title&gt;
        &lt;isbn&gt;1-292-09761-2&lt;/isbn&gt;
        &lt;category&gt;Logic&lt;/category&gt;
        &lt;category&gt;Mathematics&lt;/category&gt;
        &lt;location&gt;
          &lt;area&gt;hall1&lt;/area&gt;
          &lt;case&gt;1&lt;/case&gt;
          &lt;shelf&gt;3&lt;/shelf&gt;
        &lt;/location&gt;
        &lt;description&gt;.&lt;/description&gt;
       &lt;/book&gt;
  &lt;/books&gt;
  </code></pre>
  
  <p>Is it possible to count how many books are there with elements area='hall1' and case='1'?</p>
  
  <p>I tried this:</p>
  
  <pre><code>count(//books/book[location/area='hall1'])
  </code></pre>
  
  <p>but i do not know how to include case='1' "restriction" also</p>