> [!NOTE]
> **Note:** This entity is only used with election results feeds. It isn't used with the pre-election data or officeholder feed types.

`Counts` isn't used or referenced directly. Instead, it's only used as an
extension base for the following entities:

- [`SummaryCounts`](https://developers.google.com/civics-data/reference/counts#summary-counts): Used to report on [`Contest`](https://developers.google.com/civics-data/reference/contest) and geopolitical unit ([`GpUnit`](https://developers.google.com/civics-data/reference/gp-unit)) summary vote counts.
- [`VoteCounts`](https://developers.google.com/civics-data/reference/counts#vote-counts): Used to report on `Contest` vote counts.

`Counts` lets you filter vote counts by device characteristics, or by the type
of ballot or write-in. It also lets you link the counts to a defined `GpUnit`
entity, such as for a country.

## Elements

The following table describes the elements for `Counts`:

| Element | Multiplicity | Type | Description |
|---|---|---|---|
| `GpUnitId` | 0 or 1 | `IDREF` | Unique identifier for a [`GpUnit`](https://developers.google.com/civics-data/reference/gp-unit) element. Used to associate counts with a geopolitical unit, such as a precinct, county, or township. |
| `IsSuppressedForPrivacy` | 0 or 1 | [`boolean`](https://developers.google.com/civics-data/reference/simple-data-types#xs-boolean) | Indicates whether votes are suppressed for voter privacy. If this isn't present, the default value is `false`. |
| `Type` | 0 or 1 | [`CountItemType`](https://developers.google.com/civics-data/reference/count-item-type) | The type of count being used as a filter on the vote counts, such as election day or early voting. If the type for a `Count` item isn't listed in the `CountItemType` enumeration, set `Type` to `other` and include the custom type in `OtherType`. |
| `OtherType` | 0 or 1 | [`string`](https://developers.google.com/civics-data/reference/simple-data-types#xs-string) | Used when `Type` is `other` to specify what's being counted. |

## SummaryCounts

Use `SummaryCounts` to represent contest-wide or geopolitical unit-wide summary
counts.

> [!NOTE]
> **Note:** This entity is only used with election results feeds. It isn't used with the pre-election data or officeholder feed types.

`SummaryCounts` includes [`Counts`](https://developers.google.com/civics-data/reference/counts) as
an extension base and therefore inherits the elements from
`Counts`. However, `SummaryCounts` isn't a type of `Counts`, but is instead
included directly for [`Contest`](https://developers.google.com/civics-data/reference/contest) and
[`GpUnit`](https://developers.google.com/civics-data/reference/gp-unit).

`SummaryCounts` can be used to provide a geographical scope-wide summary of
miscellaneous counts associated with a `Contest`, such as the total number of
ballots cast, total number of overvotes, undervotes, and write-ins.
`SummaryCounts` can optionally reference `GpUnit` elements defined for
lower-level reporting units. This lets you associate summary counts with other
lower-level reporting units within the scope of the contest.

`SummaryCounts` can also be used to provide summary counts specific to a
`GpUnit`. For example, a `GpUnit` defined for a country can include
`SummaryCounts` to provide a summary count. `SummaryCounts`, in this case,
doesn't include the `GpUnitId` element in `Counts`.

In `Counts`, if the type of count item isn't listed in the enumeration
[`CountItemType`](https://developers.google.com/civics-data/reference/count-item-type), use `other` and
include the custom type in `OtherType`.

### Elements

The following table describes the elements for `SummaryCounts`:

| Element | Multiplicity | Type | Description |
|---|---|---|---|
| `BallotsCast` | 0 or 1 | `integer` | Number of ballots cast. |
| `BallotsOutstanding` | 0 or 1 | `integer` | Number of ballots not yet counted. |
| `BallotsRejected` | 0 or 1 | `integer` | Number of ballots rejected. |
| `Overvotes` | 0 or 1 | `integer` | Number of overvotes. |
| `Undervotes` | 0 or 1 | `integer` | Number of undervotes. |
| `WriteIns` | 0 or 1 | `integer` | Number of write-ins. |

### Examples

### XML

```xml
    <SummaryCounts>
      <BallotsCast>2089540</BallotsCast>
      <WriteIns>2087</WriteIns>
    </SummaryCounts>
```

## VoteCounts

Use `VoteCounts` to describe the vote counts for
[`BallotSelection`](https://developers.google.com/civics-data/reference/ballot-selection) in a
[`Contest`](https://developers.google.com/civics-data/reference/contest).

> [!NOTE]
> **Note:** This entity is only used with election results feeds. It isn't used with the pre-election data or officeholder feed types.

### Elements

The following table describes the elements for `VoteCounts`:

| Element | Multiplicity | Type | Description |
|---|---|---|---|
| `Count` | 0 or 1 | `float` | The count of contest votes cast, as a number between 0 and 100. In special cases, the count can include a fractional component. For example, report 14.2% as `14.2` and not 0.142. For a list of supported types of vote counts, see [Result tabulation types](https://developers.google.com/civics-data/reference/count-item-type#result-tabulation-types). |

### Examples

### XML

```xml
    <VoteCounts>
      <GpUnitId>ru-001</GpUnitId>
      <Type>total</Type>
      <Count>6173433</Count>
    </VoteCounts>
    <VoteCounts>
      <GpUnitId>ru-001</GpUnitId>
      <Type>other</Type>
      <OtherType>projected-vote-percent</OtherType>
      <Count>22.3</Count>
    </VoteCounts>
```