How to count 'single-word' substrings between commas
<p>I have this string:</p>

<pre><code>$array= 'orange, fruit, apple juice'
</code></pre>

<p>I want to count the single-word substrings in the string (orange/fruit)</p>

<p>I have tried</p>

<pre><code>//Explode string at commas
$explode_tags = explode(",", $array);

//Check if space exists in substrings
foreach ($explode_tags as $explode_tag) {
  if (strstr(trim($explode_tag), ' ') == false) { 
  ...
  }
}   
</code></pre>

<p>Now I can't figure out how to count the substrings only when the above IF statement comes false.</p>
