original_string: protected function generate_count_records_sql(string $wheresql = null) : string {
          $alias = $this->get_table_alias();
          $db = $this->get_db();
  
          $selectsql = "SELECT COUNT(1) FROM {" . self::TABLE . "} {$alias}";
          $selectsql .= $wheresql ? ' WHERE ' . $wheresql : '';
  
          return $selectsql;
      }
code: protected function generate_count_records_sql(string $wheresql = null) : string {
          $alias = $this->get_table_alias();
          $db = $this->get_db();
  
          $selectsql = "SELECT COUNT(1) FROM {" . self::TABLE . "} {$alias}";
          $selectsql .= $wheresql ? ' WHERE ' . $wheresql : '';
  
          return $selectsql;
      }
code_tokens: protected function generate_count_records_sql ( string $ wheresql = null ) : string { $ alias = $ this -> get_table_alias ( ) ; $ db = $ this -> get_db ( ) ; $ selectsql = "SELECT COUNT(1) FROM {" . self :: TABLE . "} {$alias}" ; $ selectsql .= $ wheresql ? ' WHERE ' . $ wheresql : '' ; return $ selectsql ; }
docstring: Build the SQL to be used in count_records_sql.
  
  @param string|null $wheresql Where conditions for the SQL
  @return string
docstring_tokens: Build the SQL to be used in count_records_sql .