> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequence.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# useGetCountOfPrimarySaleItems

> The useGetCountOfPrimarySaleItems hook returns the number of filtered primary sale items in a collection

## Parameters

| Name                       | Type                   | Description                                              |
| -------------------------- | ---------------------- | -------------------------------------------------------- |
| `params.chainId`           | `number`               | The chain ID (e.g., 1 for Ethereum, 137 for Polygon)     |
| `params.collectionAddress` | `string`               | The collection contract address                          |
| `params.config`            | `SdkConfig`            | Optional SDK configuration parameters                    |
| `params.side`              | `OrderSide`            | The order side to count (listing or offer)               |
| `params.filter`            | `OrdersFilter`         | Optional filter for the orders                           |
| `params.query`             | `StandardQueryOptions` | Optional React Query configuration (from TanStack Query) |

## Returns

A query result containing an object with a `count` property representing the number of filtered primary sale items in a collection.

## Import

```typescript theme={null}
import { useGetCountOfPrimarySaleItems } from "@0xsequence/marketplace-sdk/react";
```

## Example

Basic usage:

```typescript theme={null}
const { data: countOfPrimarySalesItems } = useGetCountOfPrimarySaleItems({
	chainId: 1,
	primarySaleContractAddress: "0x00"
});

console.log(countOfPrimarySalesItems?.count);
```
