### Title

WordCount Problem

### Post

Hi Forum,

I have problem to find out how many words in my language list.

$lang_List="SE-SF PF-PE SE"

WordCount( substitute ( $lang_list; " "; ¶)) = 5 ?? But I need it to be equal to **3** for my script logic.

I know WordCount will count the ampersand (&) and hyphen (-) characters for a beginning of a new word.

But

Getvalue(substitute("SE-SF PF-PE SE";" ";¶);1) =SE-SF

Getvalue(substitute("SE-SF PF-PE SE";" ";¶);2)=PF-PE

Getvalue(substitute("SE-SF PF-PE SE";" ";¶);3)=SE

Getvalue(substitute("SE-SF PF-PE SE";" ";¶);4) is Empty

Getvalue(substitute("SE-SF PF-PE SE";" ";¶);5) is Empty

ValueCount will return the number of VALUES inside the field just as WordCount returns the number of words. This will be one more value than there are returns unless there is a trailing return after the last value in your list--which is sometimes the case.

And Patterncount can count the exact number of returns.