## Count Vectors

**post** `/v5/vector-stores/{vector_store_name}/count`

Count documents in a vector store, optionally filtered by metadata.

**Use Cases:**

- Monitor vector store size and growth over time
- Preview the number of documents matching a filter before deletion
- Validate data ingestion by comparing expected versus actual document counts
- Analyze document distribution across metadata categories

**Filtering:** Apply the same metadata filter syntax as delete and list operations. Only indexed fields
can be used for filtering. An empty filter counts all documents in the store.

### Path Parameters

- `vector_store_name: string`

  The name of the vector store

### Body Parameters

- `filter: optional map[unknown]`

  Metadata filter expression

### Returns

- `count: number`

  Number of documents matching the criteria

### Example

```http
curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/count \
    -X POST \
    -H "x-api-key: $SGP_API_KEY"
```

#### Response

```json
{
  "count": 0
}
```
