# wc {#wc}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`wc(X)`

## Arguments {#arguments}

**X** is a string scalar/vector.

## Details {#details}

Count the words in *X*.

## Examples {#examples}

```
wc(`apple);
// output: 1

wc("This is a 7th generation iphone!");
// output: 6

wc("This is a 7th generation iphone!" "I wonder what the 8th generation looks like");
// output: [6,8]
```

