[c#] Counting how many times a certain char appears in a string before any other char appears