title: How to count of sub-string occurrences?
body: <p>Suppose I have a string like:</p>
  
  <pre><code>MyString = "OU=Level3,OU=Level2,OU=Level1,DC=domain,DC=com";
  </code></pre>
  
  <p>then I want to know how many time of occurrences of sub-string "OU=" in this string. With single char, maybe there is something like:</p>
  
  <pre><code>int count = MyString.Split("OU=").Length - 1;
  </code></pre>
  
  <p>but <code>Split</code> only works for <code>char</code>, not <code>string</code>.</p>
  
  <p>Also how to find the position of n occurrences? For example, the position of 2nd <code>"OU="</code> in the string?</p>
  
  <p>How to resolve this issue?</p>