title: Count number of |
body: <p>I need help with a script, the script is supposed to count the number of <code>|</code> before a specific  string.</p>
  
  <p>info.txt</p>
  
  <pre><code>text=jam|hello=123|result=ok|cow=cat|...
  </code></pre>
  
  <p>So in this example the answer should be 2 if you search for result=
  Is this possible in batch?</p>