> For the complete documentation index, see [llms.txt](https://til.devjugal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.devjugal.com/linux/grep/grep-count-matches.md).

# Grep Count Matches

To print count matching lines we can use `-c, --count` argument with `grep` command.

## Example

```bash
seq 100 | grep -c 5
19
```

***Source:*** [***Linuxize***](https://linuxize.com/post/how-to-use-grep-command-to-search-files-in-linux/#count-matches)
