title: How to count a specific tags in xml file?
body: <p>XML:</p>
  
  <pre><code>&lt;chapter&gt;
  &lt;openr&gt;&lt;title&gt;&lt;num aid:pstyle="_CN"&gt;1&lt;/num&gt;&lt;/title&gt;&lt;/openr&gt;
  &lt;media.block id="fig001"&gt;&lt;media type="image"/&gt;&lt;caption aid:pstyle="Caption"&gt;&lt;num&gt;FIG. 1.1&amp;#x2002;&lt;/num&gt;&lt;para&gt;&lt;txt&gt;some text&lt;/txt&gt;&lt;/para&gt;&lt;/caption&gt;&lt;/media.block&gt;
  &lt;txt&gt;some&lt;/txt&gt;
  &lt;media.block id="fig002"&gt;&lt;media type="image"/&gt;&lt;caption aid:pstyle="Caption"&gt;&lt;num&gt;FIG. 1.2&amp;#x2002;&lt;/num&gt;&lt;para&gt;&lt;txt&gt;some text&lt;/txt&gt;&lt;/para&gt;&lt;/caption&gt;&lt;/media.block&gt;
  &lt;/chapter&gt;
  </code></pre>
  
  <p>I need to extract the count of <code>&lt;media.block</code>(to get the no.of figures in a document) and the content of <code>&lt;num aid:pstyle="_CN"&gt;1&lt;/num&gt;</code>(here ans=1).</p>
  
  <p>I don't know how to access XML element using extendscript. Atleast a hint would be more than enough</p>