4.6.0 (latest) 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.1 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0

    public sealed class StructuredAggregationQuery.Types.Aggregation.Types.Count : IMessage<StructuredAggregationQuery.Types.Aggregation.Types.Count>, IEquatable<StructuredAggregationQuery.Types.Aggregation.Types.Count>, IDeepCloneable<StructuredAggregationQuery.Types.Aggregation.Types.Count>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore v1 API class StructuredAggregationQuery.Types.Aggregation.Types.Count.

Count of documents that match the query.

The `COUNT(*)` aggregation function operates on the entire document
so it does not require a field reference.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> StructuredAggregationQuery.Types.Aggregation.Types.Count

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Count](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Count), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Count](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Count), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Count](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Count), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Firestore.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)

## Assembly

Google.Cloud.Firestore.V1.dll

## Constructors

### Count()

    public Count()

### Count(Count)

    public Count(StructuredAggregationQuery.Types.Aggregation.Types.Count other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQueryhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Count` |

## Properties

### UpTo

    public long? UpTo { get; set; }

Optional. Optional constraint on the maximum number of documents to
count.

This provides a way to set an upper bound on the number of documents
to scan, limiting latency, and cost.

Unspecified is interpreted as no bound.

High-Level Example:

    AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );

Requires:

- Must be greater than zero when present.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |