title: Count xml elements with multiple conditions and precise properties
body: <p>I have the following code (xml and xslt) and I would like to count some xml elements with 2 conditions.</p>
  
  <p>XMLcode:</p>
  
  <pre><code>&lt;home&gt;
      &lt;place Value='place1'&gt;
          &lt;property Name="Type" Value="house" /&gt;
          &lt;property Name="Context" Value="roof" /&gt;
          &lt;property Name="Color" Value="blue" /&gt;
      &lt;/place&gt;
      &lt;place Value='place2'&gt;
          &lt;property Name="Type" Value="house" /&gt;
          &lt;property Name="Context" Value="kitchen" /&gt;
          &lt;property Name="Color" Value="red" /&gt;
      &lt;/place&gt;
      &lt;place Value='&gt;
          &lt;property Name="Type" Value="house" /&gt;
          &lt;property Name="Context" Value="floor" /&gt;
          &lt;property Name="Color" Value="black" /&gt;
      &lt;/place&gt;
      &lt;place Value='place4'&gt;
          &lt;property Name="Type" Value="house" /&gt;
          &lt;property Name="Context" Value="kitchen" /&gt;
          &lt;property Name="Color" Value="black" /&gt;
      &lt;/place&gt;
      &lt;place Value='place5'&gt;
          &lt;property Name="Type" Value="apartment" /&gt;
          &lt;property Name="Context" Value="roof" /&gt;
          &lt;property Name="Color" Value="blue" /&gt;
      &lt;/place&gt;
      &lt;place Value='place6'&gt;
          &lt;property Name="Type" Value="apartment" /&gt;
          &lt;property Name="Context" Value="kitchen" /&gt;
          &lt;property Name="Color" Value="red" /&gt;
      &lt;/place&gt;
  &lt;/home&gt;
  </code></pre>
  
  <p>xslt code:</p>
  
  <p></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;table border="1" cellspacing="0" cellpadding="3"&gt;
      &lt;tr&gt;
      &lt;td&gt;Place&lt;/td&gt;
      &lt;td&gt;Type&lt;/td&gt;
      &lt;td&gt;Context&lt;/td&gt;
      &lt;td&gt;Color&lt;/td&gt;
      &lt;/tr&gt;
      &lt;xsl:for-each select="place"&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;xsl:value-of select="@Value" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;xsl:value-of select="property[@Name='Type']/@Value" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;xsl:value-of select="property[@Name='Context']/@Value" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;xsl:value-of select="property[@Name='Color']/@Value" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/xsl:for-each&gt;
  &lt;/table&gt;
  
  &lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;
              Number of house:
          &lt;/td&gt;
          &lt;td&gt;
              &lt;xsl:value-of select="count(place/property[@Name='Type' and @Value='house'])"/&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              Number of kitchen:
          &lt;/td&gt;
          &lt;td&gt;
              &lt;xsl:value-of select="count(place/property[@Name='Context' and @Value='kitchen'])"/&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
               Number of house with kitchen:
          &lt;/td&gt;
          &lt;td&gt;
              &lt;xsl:value-of select="count(place/property[@Name='Type' and @Value='house'][@Name='Context' and @Value='kitchen'])"/&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The first two counts are working correctly (there is just one condition on these counts) but the third count does not work because there are two conditions. Any suggestion how to make it work?
  Thanks.</p>