The DCOUNT() function counts delimited substrings within a string.
The DCOUNT() function counts substrings delimited by delimiter within string.
If string is null, DCOUNT() returns zero. In all other cases, DCOUNT() returns a value one greater than the COUNT() function applied to the same string.
If substring is null, DCOUNT() returns the length of string.
Programs compiled with the $NOCASE.STRINGS compiler directive use case insensitive string comparisons in the DCOUNT() function.
S = "172-34-876"
N = DCOUNT(S, "-")
sets N to 3.
S = 'ABABABABABABA'
N = DCOUNT(S, "BAB")
sets N to 4.
FIELDS = DCOUNT(REC, @FM)
This statement counts the fields in REC.