title: count the number of occurrences of a string in XML using XSLT
body: <p>I want to calcutae the number of occurrences of a string in a particular node in XML document using XSLT. 
  Consider this example</p>
  
  <pre><code> &lt;mainNode&gt;
  &lt;book&gt;
      &lt;price&gt; 100 &lt;/price&gt;
      &lt;city&gt; chennai &lt;/city&gt;
      &lt;list&gt;
          &lt;language&gt; c java ruby &lt;/language&gt;
      &lt;/list&gt;
  &lt;/book&gt;
  
  &lt;book&gt;
      &lt;price&gt; 200 &lt;/price&gt;
      &lt;city&gt; banglore &lt;/city&gt;
      &lt;list&gt;
          &lt;language&gt; c java &lt;/language&gt;
      &lt;/list&gt;
  &lt;/book&gt;
  
  &lt;book&gt;
      &lt;price&gt; 300 &lt;/price&gt;
      &lt;city&gt; delhi &lt;/city&gt;
      &lt;list&gt;
          &lt;language&gt; java ruby &lt;/language&gt;
      &lt;/list&gt;
  &lt;/book&gt;
  &lt;/mainNode&gt;      
  </code></pre>
  
  <p>Here I want to count the occurrences of "java" </p>
  
  <p><strong>I Want Output like this::   java -- 3</strong></p>
  
  <p>How to do this??? any idea???</p>