title: How to count the delimiters in a string?
body: <p>I have a question...kind of basic but I thought I can take some help from you guys</p>
  
  <p>I am encrypting a file and the information I encrypt is </p>
  
  <pre><code>LoginTxtBox.Text + "/" + PwdTxtBox.Text + "/" + InstNameTextBox.Text + "/" + DBNameTxtBox.Text;
  </code></pre>
  
  <p>When I decrypt it ... I am doing:</p>
  
  <pre><code>StringBuilder sClearText = new StringBuilder();
  encryptor.Decrypt(sPrivateKeyFile, sDataFile, sClearText);
  
  //username/password
  string s = sClearText.ToString();
  string[] split = s.Split(new Char[] { '/' });
  if (split.Length == 4)
  {
      split0 = split[0];
      split1 = split[1];
      split2 = split[1];
      split3 = split[1];
  </code></pre>
  
  <p>Now the requirement I got is I need to count the delimiters in the decrypted format of string and if there are more than 2 delimiter then its not a new application. If there is only one delimiter then its a never used application. I don't know how to to count the delimiters from the decrypt string...Help me plzz </p>