title: Prolog Comparisation problem
body: <p>anyone have idea how to solve this problem</p>
  
  <p>counts the number of occurrences of an operator inside an expression. For instance, the query:</p>
  
  <pre><code>?- count(a+b*c-(2+3*4)/(5*(2+a)+(b+c)^f((d-e)*(x-y))), *, C).
  </code></pre>
  
  <p>would count the number of occurrences of operator * in the expression given as the first argument and output on C</p>
  
  <p>I am using SWI-prolog</p>