# Count Objects

You can count the total number of objects of a given type as follows:

<table><thead><tr><th width="551">Relative URL</th><th>HTTP Request Method</th></tr></thead><tbody><tr><td><code>/api/v4/</code><em><code>backend-deployment-id</code></em><code>/objects/</code><em><code>model</code></em><code>/count.json</code></td><td>GET</td></tr></tbody></table>

{% hint style="info" %}
Replace *`model`* with the type of object that you wish to retrieve (as defined in your app's Data Model), for example `person`, `job` or `asset`.
{% endhint %}

### **Example**

{% hint style="info" %}
**BASE-URL**

The below examples contain a `BASE-URL` placeholder. Please refer to the [HTTP Endpoints](https://docs.journeyapps.com/reference/introduction#http-endpoints) section to get the base URL relevant to your deployment.
{% endhint %}

Count the number of `task` objects:

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

```http
GET BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks/count.json
```

{% endtab %}

{% tab title="curl" %}

```shell
curl "BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks/count.json" \
    -u "533bda53027894f69b001055:7Ajj5htRY1uzw7b4w23V"
```

{% endtab %}

{% tab title="ruby" %}

```ruby
require 'rest-client'
journey = RestClient::Resource.new "BASE-URL/api/v4", "533bda53027894f69b001055", "7Ajj5htRY1uzw7b4w23V"
journey["533bda53027894f69b001055/objects/tasks/count.json"].get
```

{% endtab %}
{% endtabs %}

**Response**

```json
{"count":3,"type":"task"}
```

You can also count the number of objects returned by a [query](https://docs.journeyapps.com/reference/backend-api/api-reference/querying-objects).
