# Count

Handles all Count Transfer Restriction related functionality

## Hierarchy

↳ [TransferRestrictionBase](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transferrestrictionbase)‹[Count](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/enums/transferrestrictiontype.md#count)›

↳ **Count**

## Index

### Properties

* [context](#protected-context)
* [get](#get)
* [parent](#protected-parent)
* [type](#protected-type)

### Methods

* [addRestriction](#addrestriction)
* [removeRestrictions](#removerestrictions)
* [setRestrictions](#setrestrictions)

## Properties

### `Protected` context

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

*Inherited from void*

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

***

### get

• **get**: *function*

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

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L61)

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://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/activetransferrestrictions.md)*‹*[*CountTransferRestriction*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/counttransferrestriction.md)*››*

***

### `Protected` parent

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

*Inherited from void*

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

***

### `Protected` type

• **type**: [*Count*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/enums/transferrestrictiontype.md#count) = TransferRestrictionType.Count as const

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

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:16*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L16)

## Methods

### addRestriction

▸ **addRestriction**(`args`: Omit‹[AddCountTransferRestrictionParams](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/globals#addcounttransferrestrictionparams), "type"›, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transactionqueue)*‹number››*

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

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:26*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L26)

Add a Count Transfer Restriction to 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://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/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/v11.0.2/globals#addcounttransferrestrictionparams), "type"› |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)                                                     |

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

***

### removeRestrictions

▸ **removeRestrictions**(`args`: void, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transactionqueue)*‹number››*

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

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:50*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L50)

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://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/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                                                                                                            |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md) |

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

***

### setRestrictions

▸ **setRestrictions**(`args`: Omit‹[SetCountTransferRestrictionsParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/setcounttransferrestrictionsparams.md), "type"›, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transactionqueue)*‹number››*

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

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/Count.ts:38*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/TransferRestrictions/Count.ts#L38)

Sets all Count Transfer Restrictions on 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://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/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://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/setcounttransferrestrictionsparams.md), "type"› |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)                                                         |

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