---
url: /process-functions/dimension-elementcount.md
description: Returns the number of elements in a dimension within the specified model.
---

# dimension.elementCount

Returns the number of elements in a dimension within the specified model.

This function is used to retrieve the number of elements in a dimension, returns an integer. Returns `-1` in case of invalid dimension name.

```js
dimension.elementCount(dimension_name)
```

#### Parameters

* `dimension_name` - Name of a dimension.

#### Example

```js
let elementCount = dimension.elementCount("time");
```
