# Get Column Count

### Overview

This procedure gets the number of columns in a table and is useful for understanding the table’s structure. You can use it to check if a table has the expected number of fields, validate schema changes, or make sure a table meets certain requirements before running other steps in a process. It’s also helpful when working with dynamic tables where the column count might change over time.

### Input Concepts

| Concept | Type  | Description                                      | Default    | Required |
| ------- | ----- | ------------------------------------------------ | ---------- | -------- |
| `table` | table | The table whose column count is to be retrieved. | No default | Yes      |

### Output Concepts

| Concept        | Description                         |
| -------------- | ----------------------------------- |
| `column count` | The number of columns in the table. |

### Examples

#### 1. Get the Column Count of a Sample Table

In this example, `the table` refers to the following table, which can be generated using the `create a sample table` procedure:

| Name | Number             | Address          | City          |
| ---- | ------------------ | ---------------- | ------------- |
| john | + 1 (415) 691 9426 | 123 east street  | San Francisco |
| joe  | + 1 (415) 691 1234 | 321 west street  | San Jose      |
| jack | + 1 (415) 691 4595 | 213 north street | San Francisco |

{% tabs %}
{% tab title="Automation" %}

```
get the table's column count
```

{% endtab %}

{% tab title="Results" %}
4
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/automation-areas/tables-v2/get-a-column/get-column-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
