code: public function count(string $sql, array $parameters = [])
      {
          $statement = $this->select($sql, $parameters);
  
          if ($statement === null) {
              return false;
          }
  
          $cursor = $statement->fetch(PDO::FETCH_ASSOC);
  
          $count = (int) \current($cursor);
  
          $statement->closeCursor();
          $statement = null;
  
          return $count;
      }
docs: @param string $sql
  @param array  $parameters
  
  @throws DatabaseException
  
  @return int|bool