---
name: "counttodo"
section: "1"
platform: "linux"
package: "todo.txt-gtd"
version: "0.11"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/counttodo"
---

# counttodo(1)

Return a count of the active tasks in a todo.txt file

## NAME

counttodo - Return a count of the active tasks in a todo.txt file

### SYNOPSIS

`counttodo [-f FILE]`

### DESCRIPTION

Count the number of active tasks in a todo.txt file.

Empty or whitespace-only lines are excluded from the count.

Lines which have no context flag (@foo) are excluded.

Lines containing pending context flags (@~foo) are excluded. Comment lines, starting with a “#”, are excluded.

### OPTIONS

- •

  *-h*, *-help* - Print help and exit

- •

  *-f*, *-file* – Specify the todo.txt file location (Default via `todo.txt --info`)

### SEE ALSO

[todo.txt-base(8)](/todo.txt-base/8.md), todo.txt(8), [gtdcleanup(1)](/gtdcleanup/1.md)
