title: Error php 7.1 -> 7.2 :count(): Parameter must be an array or an object that implements Countable in concrete5 addon
body: <p>I have an unsupported addon for concrete5 which is showing this error wehen upating php 7.1 to 7.2</p>
  
  <p>i have not much knowledge about php and ask if somebody have an easy soltion for the code below.</p>
  
  <pre><code>&lt;?php
  $arr_tags = array();
  foreach ($pages as $page) {
      $tags = $page-&gt;getAttribute('tags');
      if ($tags &amp;&amp; count($tags)) {
          foreach ($tags as $tag) {
              $arr_tags[] = $tag;
          }
      }
  }
  $unique_tags = array_unique($arr_tags);
  $keys = array_keys($unique_tags, '');
  foreach ($keys as $k) {
      unset($unique_tags[$k]);
  }
  ?&gt;
  </code></pre>
  
  <p>count(): Parameter must be an array or an object that implements Countable</p>