# count

`import { count } from "destack:bytes";`

Return the number of non-overlapping occurrences of `needle`.

```ds title="count"
export function count(bytes: &'a readonly [uint8], needle: &'b readonly [uint8]): usize
```

[language/library/src/bytes/bytes.ds:178:180](https://github.com/destack-sh/destack/blob/main/language/library/src/bytes/bytes.ds#L178-L180)
