title: Objective C : Find number of operators in a mathematical string
body: <p>I'm using the following technique to find the number of operators in a mathematical string.</p>
  
  <pre><code>for (int index = 0; index &lt; [self.evaluateString length]; index++) {
      unichar chars = [self.evaluateString characterAtIndex:index];
      if (chars == '+' || chars == '-' || chars == '*' || chars == '/' ||chars == '^') {
          self.operatorCount++;
      }
  }
  </code></pre>
  
  <p>My trainer says this method is not very good. I would like to know is there any better/more elegant method to do this. Thanks.</p>