NOTMUCH-COUNT(1)
π NAME π
okay so bestie, this is notmuch-count β it counts messages matching the search terms you give it β¨
πΈ SYNOPSIS πΈ
notmuch count [option ...] <search-term> ...
π¦ DESCRIPTION π¦
It literally just counts the messages that match your search terms. That's the whole vibe. π₯
The number of matching messages (or threads) gets output to stdout. Periodt.
And if you give it no search terms at all? It'll show you a count of every message (or thread) chillin' in the database. The whole squad. π
If you wanna know the supported syntax for <search-terms>, go peek at notmuch-search-terms β iykyk.
The supported options for count include:
--output=(messages|threads|files)β pick what you're counting, bestie:messagesβ output the number of matching messages. This is the default, so if you don't say anything this is what you get πthreadsβ output the number of matching threads.filesβ output the number of files associated with matching messages. Ngl this one can be bigger than the number of matching messages, because duplicates exist (i.e. multiple files having the samemessage-id). Not a glitch, just how it is π
--exclude=(true|false)β say whether you wanna omit messages matchingsearch.exclude_tagsfrom the count (that's the default,true) or not. Choose wisely β¨--batchβ read queries from a file (stdinby default), one per line, and output the number of matching messages (or threads) tostdout, one per line. And on an empty input line, the count of all messages (or threads) in the database will be output. Heads up though: this option is not compatible with specifying search terms on the command line. So don't do that π--lastmodβ appendlastmod(that's the counter for number of database updates) andUUIDto the output. Real talk:lastmodvalues are only comparable between databases with the sameUUID. Don't compare across different ones, it means nothing π«Ά--input=<filename>β read input from the given file instead of fromstdin. This one implies--batchπ
π SEE ALSO π
notmuch, notmuch-config, notmuch-dump, notmuch-hooks, notmuch-insert, notmuch-new, notmuch-reply, notmuch-restore, notmuch-search, notmuch-search-terms, notmuch-show, notmuch-tag
π Author
Carl Worth and many others π«Ά
π Copyright
2009-2026, Carl Worth and many others
and that's the whole page bestie β¨ version 0.40, dated Jan 31, 2026 β count it, love it, slay ππ
π¦ where this page comes from
- fedora 44: notmuch 0.40-1.fc44 Β· GPL-3.0-or-later
- fedora 44: notmuch 0.40-1.fc44 Β· GPL-3.0-or-later
- nixos 26.05: notmuch 0.40
- ubuntu resolute: notmuch 0.40-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms