The + syntax should be used in preference to the obsolete ? form.

{+fieldname=['found'],['not_found'][[,initial_value],limit[,reset_value]]}

The + condition field syntax, when given numerical values, may be used to set up a number of counting functions. Full nesting of conditional field expressions is supported, e.g.
{field1*field2}
{field1*2-field2}
{field1}{field2}
etc. as long as they resolve to a number.

Click to expand/collapse this hidden text{+fieldname=found,,[initial_value][,limit[,reset_value]]}
A counter that is incremented when a named field is found.
Click to expand/collapse this hidden text{+fieldname=,not_found[,[initial_value],limit[,reset_value]]}
A counter that is incremented when a named field is not found.
Click to expand/collapse this hidden text{+fieldname=found}
A simple construct for counting found fields, where the initial value is null.

Obsolete syntax:

Click to expand/collapse this hidden text{fieldname=digits[,initial_value[,limit]]}
This initializes and increments a counter: use +fieldname syntax above instead.

See also More on defining composite fields.