# TLO:SpawnCount

## Description

Object used to get information on the count(s) of all spawns or specific spawn(s). Uses the filters under [Spawn Search](/macroquest/general-information/spawn-search.md).

## Forms

|                                                                                                                 |                                                                     |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md) **SpawnCount**                 | Total number of spawns in current zone                              |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md) **SpawnCount\[search string]** | Total number of spawns in current zone matching the *search string* |

## Access to Types

* [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md) **int**

## Examples

`/echo ${SpawnCount}`

Displays the count of all spawns.

`/echo ${SpawnCount[range 45 50]}`

Displays the count of all spawns in the level range of 45 to 50.

`/echo ${SpawnCount[npc radius 100]}`

Displays count of all NPCs within a radius of 100.

## See Also

* [Top-Level Objects](/macroquest/data-types-and-top-level-objects/top-level-objects.md)
* [int](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)
* [Spawn Search](/macroquest/general-information/spawn-search.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/top-level-objects/tlo-spawncount.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
