> For the complete documentation index, see [llms.txt](https://developers.polymath.network/polymesh-sdk-api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md).

# Count

Handles all Count Transfer Restriction related functionality

## Hierarchy

* TransferRestrictionBase‹[Count](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/enums/transferrestrictiontype.md#count)›

  ↳ **Count**

## Index

### Properties

* [context](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#protected-context)
* [get](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#get)
* [parent](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#protected-parent)
* [type](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#protected-type)

### Methods

* [addRestriction](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#addrestriction)
* [removeRestrictions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#removerestrictions)
* [setRestrictions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/count.md#setrestrictions)

## Properties

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/context.md)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Namespace.ts#L11)

### get

• **get**: *function*

*Overrides* [*TransferRestrictionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md)*.*[*get*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md#get)

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:66*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L66)

Retrieve all active Count Transfer Restrictions

**`note`** there is a maximum number of restrictions allowed accross all types. The `availableSlots` property of the result represents how many more restrictions can be added before reaching that limit

#### Type declaration:

▸ (): *Promise‹*[*ActiveTransferRestrictions*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/activetransferrestrictions.md)*‹*[*CountTransferRestriction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/counttransferrestriction.md)*››*

### `Protected` parent

• **parent**: [*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/securitytoken.md)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Namespace.ts#L9)

### `Protected` type

• **type**: [*Count*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/enums/transferrestrictiontype.md#count) = TransferRestrictionType.Count as const

*Overrides* [*TransferRestrictionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md)*.*[*type*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md#protected-abstract-type)

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:15*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L15)

## Methods

### addRestriction

▸ **addRestriction**(`args`: Omit‹[AddCountTransferRestrictionParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/globals.md#addcounttransferrestrictionparams), "type"›): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*

*Overrides* [*TransferRestrictionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md)*.*[*addRestriction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md#addrestriction)

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:28*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L28)

Add a Count Transfer Restriction to this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** required role:

* Security Token Owner

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/proceduremethod.md), which means you can call `addRestriction.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name   | Type                                                                                                                                                                   |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args` | Omit‹[AddCountTransferRestrictionParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/globals.md#addcounttransferrestrictionparams), "type"› |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*

### removeRestrictions

▸ **removeRestrictions**(`args`: void): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*

*Overrides* [*TransferRestrictionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md)*.*[*removeRestrictions*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md#removerestrictions)

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:55*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L55)

Removes all Count Transfer Restrictions from this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/proceduremethod.md), which means you can call `removeRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name   | Type |
| ------ | ---- |
| `args` | void |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*

### setRestrictions

▸ **setRestrictions**(`args`: Omit‹[SetCountTransferRestrictionsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/setcounttransferrestrictionsparams.md), "type"›): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*

*Overrides* [*TransferRestrictionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md)*.*[*setRestrictions*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transferrestrictionbase.md#setrestrictions)

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:43*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L43)

Sets all Count Transfer Restrictions on this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** required role:

* Security Token Owner

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/proceduremethod.md), which means you can call `setRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name   | Type                                                                                                                                                                        |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args` | Omit‹[SetCountTransferRestrictionsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/setcounttransferrestrictionsparams.md), "type"› |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue.md)*‹number››*
