# Javascript: MisspelledWordCollection.getCountOf Method

> Gets the number of misspelled words with a special meaning from the collection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: MisspelledWordCollection.getCountOf Method
- **381 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/misspelledwordcollection/getcountof-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/misspelledwordcollection/getcountof-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/misspelledwordcollection/getcountof-method/llms-full.txt

---

### Description

Gets the number of misspelled words with a special meaning from the collection.

### Syntax

```javascript
<void> MisspelledWordCollection.getCountOf(<MisspelledWordKind> kind, <RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| kind | Specifies the word's kind. |
| callback | Receives the number of misspelled words with a special meaning from the collection. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `MisspelledWordCollection.getCountOf` in a practical document-editing workflow. It gets the number of misspelled words with a special meaning from the collection.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectCountOf(misspelledWords) {
    misspelledWords.getCountOf(
        TXTextControl.MisspelledWordKind.All,
        function(result) {
            console.log("get count of result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [MisspelledWordCollection Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/misspelledwordcollection/llms-full.txt)
- **Next:** [Javascript: MisspelledWordCollection.getItemAtInputPosition Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/misspelledwordcollection/getitematinputposition-method/llms-full.txt)
