class_docstr: SQL connectors are used to connect to SQL databases in different dialects.
class_docstr_tok: ["SQL","connectors","are","used","to","connect","to","SQL","databases","in","different","dialects","."]
docstr: Return the number of columns in the SQL table.
  
  Returns:
      int: The number of columns in the SQL table.
docstr_tok: ["Return","the","number","of","columns","in","the","SQL","table",".","Returns",":","int",":","The","number","of","columns","in","the","SQL","table","."]
code: def columns_count(self):
      """
      Return the number of columns in the SQL table.
  
      Returns:
          int: The number of columns in the SQL table.
      """
  
      if self._columns_count is not None:
          return self._columns_count
  
      if self.logger:
          self.logger.log(
              "Getting the number of columns in the table "
              f"{self._config.table} using dialect "
              f"{self._config.dialect}"
          )
  
      self._columns_count = len(self.head().columns)
      return self._columns_count
  
imports: import re
  import os
  import pandas
  from pandasai.exceptions import MaliciousQueryError
  from .base import BaseConnector, SQLConnectorConfig, SqliteConnectorConfig
  from .base import BaseConnectorConfig
  from sqlalchemy import create_engine, text, select, asc
  from sqlalchemy.engine import Connection
  from functools import cached_property, cache
  import hashlib
  from ..helpers.path import find_project_root
  from ..constants import DEFAULT_FILE_PERMISSIONS
  from typing import Union
  import time
label_desc: Use image node_id 14 for calling the SQLConnector obj's underlying member method code with example usage: obj.columns_count() and returns: self, self