# keywordCount

> Returns the number keywords in the index.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor.Search](/engine/6000.5/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
public int keywordCount { get; }
```

### Examples

```csharp
using UnityEditor;
using UnityEditor.Search;
using UnityEngine;

static class Example_SearchIndexer_keywordCount
{
    [MenuItem("Examples/SearchIndexer/keywordCount")]
    public static void Run()
    {
        var searchIndexer = new SearchIndexer("SearchIndexerExample", FileUtil.GetUniqueTempPathInProject());
        searchIndexer.Start();
        {
            var di = searchIndexer.AddDocument("unity");

            // Add some properties and save the filter keywords.
            searchIndexer.AddProperty("is", "awesome", di, saveKeyword: true);
            searchIndexer.AddProperty("search", "powerful", di, saveKeyword: true);
        }
        searchIndexer.Finish(() =>
        {
            OnIndexReady(searchIndexer);
            // Dispose the SearchIndexer when you are done with it.
            searchIndexer.Dispose();
        });
    }

    private static void OnIndexReady(SearchIndexer si)
    {
        Debug.Log($"Index contains {si.keywordCount} keywords");
    }
}
```
