---
title: getOverallRecipientCount
slug: campaign-dev-docs/getoverallrecipientcount
createdAt: 2026-07-02T19:01:46.338Z
---

Consists of [getSentRecipientCount](https://docs.optimizely.com/campaign-dev-docs/getsentrecipientcount) and [getFailedRecipientCount](https://docs.optimizely.com/campaign-dev-docs/getfailedrecipientcount-mailingreporting). See also: [getOverallRecipientCount](https://docs.optimizely.com/campaign-dev-docs/getoverallrecipientcount).

**Type**: int

**Parameters**

| Name      | Type   | Value             |
| --------- | ------ | ----------------- |
| sessionId | String | ID of the session |
| mailingId | long   | ID of the mailing |

**Return values**

Number of recipients to whom the mailing was sent or tried to send

Returns 0 if a mailing has not been started yet.

**Code structure**

```javascript
int getOverallRecipientCount(String sessionId, long mailingId)
```
