|integer/macro||Sets which type of entity to check|
|string||Optional: Sets the character name to check, if entity is an attachment|
Returns the number of entities of the given type that currently exist.
Note that in the case of buttons, results will differ depending on whether the log is currently open or not. If so, only log buttons will be counted, while if not, only non-log buttons will be counted instead.
See Macros & Keywords for a full list of available entity types. In addition to standard types, this script also supports checking the current speaking character(s) which can be used, for example, to trigger different UI styles depending on whose lines are in focus.