CTS(SOURCE, DESTINATION [, NORESET]) - counts data field or report variable for not empty string values. String values containing only spaces are considered as empty.

Source - data field or report variable to count.
Destination - report variable to store result of the function.
Noreset - use this option if you don't want to initialize destination variable with zero value. New not zero values of the source field will be counted beginning from the previous result of the function.

Example of a report:

\scan(a)\
\a:number\ - \a:svalue\
\endscan, ctn(a:svalue,c_value)\
Count of not empty string values: \c_value\

\scan(b)\
\b:number\ - \b:svalue\
\endscan, ctn(b:svalue,c_value,noreset)\
Count of not empty string values in both tables: \c_value\

Result may be like this:

1 - apples
2 - 
3 - bananas
Count of not empty string values: 2

1 - tomatoes
Count of not empty string values in both tables: 3