# contextCount {#contextcount}

## Syntax {#syntax}

`contextCount(X, Y)`

## Arguments {#arguments}

**X** and **Y** are vectors of the same length.

## Details {#details}

Count the number of positions that are not null in both *X* and *Y*.

## Examples {#examples}

```
contextCount(1 2 3, 1 NULL 3)
// output: 2

contextCount(1..3,true false true)
// output: 3

contextCount(1 2 NULL, 1 NULL 3)
// output: 1
```

Related functions: [contextSum](contextSum.md), [contextSum2](contextSum2.md)

