> ## 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.

# useCountOfCollectables

> The useCountOfCollectables hook returns the number of NFTs in a collection.

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

const countOfCollectables = useCountOfCollectables({
  chainId,
  collectionAddress,
  side: OrderSide.listing,
  filter: {
    searchText: text,
    includeEmpty,
    properties,
  },
});
```

<ResponseField name="useCountOfCollectables details">
  <ResponseField name="* params" />

  <Expandable>
    ```typescript theme={null}
    interface UseCountOfCollectables {
      chainId: ChainId;
      collectionAddress: CollectionAddress;
      query?: { enabled?: boolean };
      filter?: {
        includeEmpty: boolean;
        searchText?: string;
        properties?: {
          name: string;
          type: PropertyType;
          min?: number;
          max?: number;
          values?: any[];
        }[];
        marketplaces?: MarketplaceKind[];
        inAccounts?: string[];
        notInAccounts?: string[];
        ordersCreatedBy?: string[];
        ordersNotCreatedBy?: string[];
      };
      side?: OrderSide;
    }
    ```
  </Expandable>

  <ResponseField name="* return properties" />

  <Expandable>
    <ParamField path="data" type="number">
      Numeric response data.
    </ParamField>

    <ParamField path="isLoading" type="boolean">
      Indicates whether the data is currently loading.
    </ParamField>
  </Expandable>
</ResponseField>
