.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "NOTMUCH-COUNT" "1" "Feb 05, 2024" "0.38.2" "notmuch" .SH NAME notmuch-count \- count messages matching the given search terms .SH SYNOPSIS .sp \fBnotmuch\fP \fBcount\fP [\fIoption\fP ...] <\fIsearch\-term\fP> ... .SH DESCRIPTION .sp Count messages matching the search terms. .sp The number of matching messages (or threads) is output to stdout. .sp With no search terms, a count of all messages (or threads) in the database will be displayed. .sp See \fI\%notmuch\-search\-terms\fP for details of the supported syntax for . .sp Supported options for \fBcount\fP include .INDENT 0.0 .TP .B \-\-output=(messages|threads|files) .INDENT 7.0 .TP .B messages Output the number of matching messages. This is the default. .TP .B threads Output the number of matching threads. .TP .B files Output the number of files associated with matching messages. This may be bigger than the number of matching messages due to duplicates (i.e. multiple files having the same message\-id). .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-exclude=(true|false) Specify whether to omit messages matching search.exclude_tags from the count (the default) or not. .UNINDENT .INDENT 0.0 .TP .B \-\-batch Read queries from a file (stdin by default), one per line, and output the number of matching messages (or threads) to stdout, one per line. On an empty input line the count of all messages (or threads) in the database will be output. This option is not compatible with specifying search terms on the command line. .UNINDENT .INDENT 0.0 .TP .B \-\-lastmod Append lastmod (counter for number of database updates) and UUID to the output. lastmod values are only comparable between databases with the same UUID. .UNINDENT .INDENT 0.0 .TP .B \-\-input= Read input from given file, instead of from stdin. Implies \fB\-\-batch\fP\&. .UNINDENT .SH SEE ALSO .sp \fI\%notmuch\fP, \fI\%notmuch\-config\fP, \fI\%notmuch\-dump\fP, \fI\%notmuch\-hooks\fP, \fI\%notmuch\-insert\fP, \fI\%notmuch\-new\fP, \fI\%notmuch\-reply\fP, \fI\%notmuch\-restore\fP, \fI\%notmuch\-search\fP, \fI\%notmuch\-search\-terms\fP, \fI\%notmuch\-show\fP, \fI\%notmuch\-tag\fP .SH AUTHOR Carl Worth and many others .SH COPYRIGHT 2009-2024, Carl Worth and many others .\" Generated by docutils manpage writer. .