1 <h1>NOTMUCH-COUNT(1)</h1>
5 notmuch-count - count messages matching the given search terms
10 <b>notmuch</b> <b>count</b> [<u>option</u> ...] <<u>search-term</u>> ...
15 Count messages matching the search terms.
17 The number of matching messages (or threads) is output to stdout.
19 With no search terms, a count of all messages (or threads) in the data‐
20 base will be displayed.
22 See <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of the supported syntax for
25 Supported options for <b>count</b> include
27 <b>--output=(messages|threads|files)</b>
30 Output the number of matching messages. This is the de‐
34 Output the number of matching threads.
36 <b>files</b> Output the number of files associated with matching mes‐
37 sages. This may be bigger than the number of matching
38 messages due to duplicates (i.e. multiple files having
41 <b>--exclude=(true|false)</b>
42 Specify whether to omit messages matching search.exclude_tags
43 from the count (the default) or not.
46 Read queries from a file (stdin by default), one per line, and
47 output the number of matching messages (or threads) to stdout,
48 one per line. On an empty input line the count of all messages
49 (or threads) in the database will be output. This option is not
50 compatible with specifying search terms on the command line.
53 Append lastmod (counter for number of database updates) and UUID
54 to the output. lastmod values are only comparable between data‐
55 bases with the same UUID.
57 <b>--input=<filename></b>
58 Read input from given file, instead of from stdin. Implies
64 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>notmuch-hooks</a>(5), <a href='../notmuch-insert-1/'>not‐</a>
65 <a href='../notmuch-insert-1/'>much-insert</a>(1), <a href='../notmuch-new-1/'>notmuch-new</a>(1), <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),
66 <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7), <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>not‐</a>
67 <a href='../notmuch-tag-1/'>much-tag</a>(1)
72 Carl Worth and many others
77 2009-2021, Carl Worth and many others