title: Wordpress email download plugin shows error message
body: <p>I'm using Email Before Download wordpress plugin on this page</p>
  
  <p><a href="https://sviluppo.babbasons.com/prova-download/" rel="nofollow noreferrer">https://sviluppo.babbasons.com/prova-download/</a></p>
  
  <p>and this product page</p>
  
  <p><a href="https://sviluppo.babbasons.com/prodotto/ak/" rel="nofollow noreferrer">https://sviluppo.babbasons.com/prodotto/ak/</a></p>
  
  <p>This is the error</p>
  
  <p>"Warning: count(): Parameter must be an array or an object that implements Countable in /web/htdocs/sviluppo.babbasons.com/home/wp-content/plugins/email-before-download/includes/class-email-before-download-db.php on line 56"</p>
  
  <p>this is the code abstract</p>
  
  <pre><code>public function item_exists($data)
  {
  
      //check if item exists and if it needs updated
      $query = $this-&gt;db-&gt;get_row("SELECT  * FROM $this-&gt;item_table WHERE download_id = '" . $data['download_id'] . "'");
      if (count($query) &gt; 0) {
          if ($query-&gt;file != $data['file']) {
              $this-&gt;db-&gt;update($this-&gt;item_table,
                  array('file' =&gt; $data['file']),
                  array('id' =&gt; $query-&gt;id)
              );
          }
          if ($query-&gt;title != $data['title']) {
              $this-&gt;db-&gt;update($this-&gt;item_table,
                  array('title' =&gt; $data['title']),
                  array('id' =&gt; $query-&gt;id)
          );
          }
          return $query-&gt;id;
      }
      return false;
  
  }
  </code></pre>
  
  <p>On the product page it's stuck loading</p>
  
  <p>Does anyone know how to solve this issue?</p>
  
  <p>Thank you</p>