## Count Items

This function will count the number of items in a field or a named variable.

The delimiter can take two forms. When String is specified, the delimiter is treated as a single item. The supplied delimiter may contain any of the escape sequences described in Escape Sequences. Note when running stepwise the delimiter is evaluated only once based on the first file's field values. Example: if the delimiter is --- a sequence of three - characters will be used to separate fields.

When Characters is specified, the delimiter is treated as a sequence of single characters, each of which will separate fields. Example: if the delimiter is ,& fields will be separated by , characters and & characters.

Regardless of the delimiter type, if it evaluates to an empty string at runtime, a default (\~) will be assumed.

Note that empty fields are counted. Example: With a delimiter of - and a source value of a--b, 3 will be returned.

The item count is returned in the specified variable or named variable.

If a named variable is specified for the source or destination, it may contain any of the escape sequences described in Escape Sequences.

Note that specifying a field when running stepwise will return the maximum item count across all selected files.