title: Error on a WordPress page (php file): Parameter must be an array or an object that implements Countable
body: <p>I am new to this and I don't know php. I get this error on WordPress posts:</p>
  <p><code>Warning: count(): Parameter must be an array or an object that implements Countable in  /www/tastingvictoria_289/public/wp-content/themes/astra-child/single.php on line 32</code> Which where <code>if(count($related_article) &gt; 0){?&gt;</code> is.</p>
  <p>Here is the file it is coming from. Is it a syntax thing?</p>
  <p>Any cue? Thanks</p>
  <pre><code>    &lt;div id=&quot;primary&quot; &lt;?php astra_primary_class(); ?&gt;&gt;
          &lt;?php astra_primary_content_top(); ?&gt;
          &lt;?php
          $related_article = get_field( &quot;select_article&quot;, 'option' );
          if(count($related_article) &gt; 0){
          ?&gt;
                  &lt;?php
                      ?&gt;
                      &lt;div class=&quot;article&quot;&gt;
                          &lt;div class=&quot;wrap&quot;&gt;
                              &lt;a href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;
                                  &lt;div class=&quot;article-image&quot; style=&quot;background-image: url(&lt;?php echo $post_thumb; ?&gt;);&quot;&gt;&lt;/div&gt;
                              &lt;/a&gt;
                              &lt;div class=&quot;infos&quot;&gt;
                                  &lt;div class=&quot;infos-wrap&quot;&gt;
                                      &lt;p class=&quot;date&quot;&gt;&lt;?php echo $postdate; ?&gt;&lt;/p&gt;
                                      &lt;a href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;h4 class=&quot;title&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/h4&gt;&lt;/a&gt;
                                      &lt;p class=&quot;excerpt&quot;&gt;&lt;?php echo $excerpt; ?&gt;&lt;/p&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;?php
                  }
                  ?&gt;
          &lt;?php   
          ?&gt;
  
      &lt;/div&gt;&lt;!-- #primary --&gt;
  
  &lt;?php if ( astra_page_layout() == 'right-sidebar' ) : ?&gt;
  
      &lt;?php get_sidebar(); ?&gt;
  
  &lt;?php endif ?&gt;
  </code></pre>