> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_NumGeometries

Returns the number of Geometries. If geometry is a GEOMETRYCOLLECTION (or MULTI\*) return the number of geometries, for single geometries will return 1.

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_NumGeometries/ST_NumGeometries.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=96c91bf9031bbb46d55e2c1010625647" alt="ST_NumGeometries" width="500" height="300" data-path="images/sql-functions/ST_NumGeometries/ST_NumGeometries.svg" />

## Signatures

```sql theme={"system"}
ST_NumGeometries (A: Geometry)
```

## Parameters

<ParamField body="A" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="Integer">
  An integer value.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_NumGeometries(ST_GeomFromWKT('LINESTRING (-29 -27, -30 -29.7, -45 -33)'))
```

```
1
```
