---
title: "Headcount (Check-Ins)"
description: "A tally of attendees for a given event time and attendance type."
---

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

# Headcount (Check-Ins)

A tally of attendees for a given event time and attendance type.
If one does not exist, the count may have been zero.

| Property | Value |
| --- | --- |
| Product | [Check-Ins](/reference/check-ins/) (`pco.checkIns`, API version `2025-05-28`) |
| Resource type | `Headcount` |
| TypeScript | `CheckIns.Headcount`, attributes `CheckIns.HeadcountAttributes`, schema `CheckIns.HeadcountSchema` |
| Planning Center path | `/check-ins/v2/headcounts` |
| Planning Center docs | [Headcount](https://api.planningcenteronline.com/docs/apps/check-ins/versions/2025-05-28/vertices/headcount) |

## How to reach it

| Client path | Returns | Filters | Create |
| --- | --- | --- | --- |
| `pco.checkIns.headcounts` | Collection |  | No |
| `pco.checkIns.events.id(eventId).attendance_types.id(attendanceTypeId).headcounts` | Collection |  | No |
| `pco.checkIns.event_times.id(eventTimeId).headcounts` | Collection |  | No |

From a collection, `.id(headcountId)` addresses one Headcount: `pco.checkIns.headcounts.id(headcountId)`. Collections support [`where`, `include`, `order`, and pagination](/guides/querying/); single resources have `get()`.

## Attributes

On `CheckIns.HeadcountAttributes`. Every resource also has `id` and `type` (`'Headcount'`) next to its attributes.

| Name | Type | Description |
| --- | --- | --- |
| `created_at` | `string \| null` |  |
| `total` | `number \| null` |  |
| `updated_at` | `string \| null` |  |

## Relationships and includes

Side-load with `include()` (or `get({ include })`) and read with `related(resource, name)`: `attendance_type`, `event_time`.

| Relationship | Type | To | Includable |
| --- | --- | --- | --- |
| `attendance_type` | To one | [AttendanceType](/reference/check-ins/attendance-type/) | Yes |
| `event_time` | To one | [EventTime](/reference/check-ins/event-time/) | Yes |

## Querying

### Where

`where(field, value)` for equality; `where(field, op, value)` with the operators listed.

| Field | Value type | Operators |
| --- | --- | --- |
| `created_at` | `string \| Date` | `gt`, `gte`, `lt`, `lte` |
| `updated_at` | `string \| Date` | `gt`, `gte`, `lt`, `lte` |

### Order

`order(...)` accepts these fields, ascending, or descending with a `-` prefix: `created_at`, `total`, `updated_at`.

## Edges

Follow these from one Headcount, `ref = pco.checkIns.headcounts.id(headcountId)`:

| Edge | Leads to | Returns | Filters | Create |
| --- | --- | --- | --- | --- |
| `ref.attendance_type` | [AttendanceType](/reference/check-ins/attendance-type/) | Collection |  | No |
| `ref.event_time` | [EventTime](/reference/check-ins/event-time/) | Collection |  | No |

## Writing

| Property | Value |
| --- | --- |
| Create | No |
| Update | No |
| Delete | No |

## Example

```ts
import type { CheckIns } from '@mackenly/planningcenterkit';

const page = await pco.checkIns.headcounts.order('created_at').perPage(25).list();
const items: CheckIns.Headcount[] = page.data;
```

Source: https://planningcenterkit.mackenly.com/reference/check-ins/headcount/index.mdx
