I am trying to write a script that will count the number of occurances of a long list of words, and it doesn't seem to be possible to do it the way I was thinking of..

$count($1-,%terms), with %terms being a list like so %term1,term2,term3,..termN. However, $count insists on considering this one whole term, and will only match the whole list at once, not the individual terms.

Is it possible to do something like this?