---
title: '|wordcount'
description: outputs the number of words in a value.
date: '2026-08-02'
categories:
  - Filter
  - Number
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/wordcount/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#wordcount
---

# |wordcount

outputs the number of words in a value.

## Documentation

Outputs the number of words in a value.

### Variable

```django
blurb = 'You are pretty smart!'
```

### Template

```django
{{ blurb|wordcount }}
```

### Result

```django
4
```

## Commentary

If you need it, it is there.
