diff --git a/doc/grep.in.1 b/doc/grep.in.1
index e9b4589..1d1546c 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -242,6 +242,22 @@ stops after outputting
 .I NUM
 non-matching lines.
 .TP
+.BI \-\^\-min-count= NUM
+When printing a count of matching lines for each input file
+.B (\-c 
+or
+.B \-\^\-count
+option), only print files with at least
+.I NUM
+matching lines.
+With the
+.B \-v
+or
+.B \-\^\-invert\-match
+option, only print files with at least
+.I NUM
+non-matching lines.
+.TP
 .BR \-o ", " \-\^\-only\-matching
 Print only the matched (non-empty) parts of a matching line,
 with each such part on a separate output line.
diff --git a/doc/grep.texi b/doc/grep.texi
index 7c80f8c..3c051c1 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -327,6 +327,15 @@ When the @samp{-c} or @samp{--count} option is also used,
 When the @samp{-v} or @samp{--invert-match} option is also used,
 @command{grep} stops after outputting @var{num} non-matching lines.
 
+@item --min-count=@var{num}
+@itemx --min-count=@var{num}
+@opindex --min-count
+@cindex min-count
+When printing a count of matching lines for each input file (@samp{-c},
+@samp{--count} option), only print files with at least @var{num} matching lines.
+With the @samp{-v}, @samp{--invert-match} option, only print files with at least
+@var{num} non-matching lines.
+
 @item -o
 @itemx --only-matching
 @opindex -o
diff --git a/src/main.c b/src/main.c
index 4e01a17..fde8a76 100644
--- a/src/main.c
+++ b/src/main.c
@@ -286,7 +286,8 @@ enum
   LABEL_OPTION,
   EXCLUDE_DIRECTORY_OPTION,
   GROUP_SEPARATOR_OPTION,
-  MMAP_OPTION
+  MMAP_OPTION,
+  COUNT_MINIMUM_OPTION
 };
 
 /* Long options equivalences. */
@@ -305,6 +306,7 @@ static struct option const long_options[] =
   {"color", optional_argument, NULL, COLOR_OPTION},
   {"colour", optional_argument, NULL, COLOR_OPTION},
   {"count", no_argument, NULL, 'c'},
+  {"min-count", required_argument, NULL, COUNT_MINIMUM_OPTION},
   {"devices", required_argument, NULL, 'D'},
   {"directories", required_argument, NULL, 'd'},
   {"exclude", required_argument, NULL, EXCLUDE_OPTION},
@@ -584,6 +586,7 @@ static int out_byte;		/* Print byte offsets. */
 static int out_before;		/* Lines of leading context. */
 static int out_after;		/* Lines of trailing context. */
 static int count_matches;	/* Count matching lines.  */
+static off_t min_count_matches;	/* Count matching lines.  */
 static int list_files;		/* List matching files.  */
 static int no_filenames;	/* Suppress file names.  */
 static off_t max_count;		/* Stop after outputting this many
@@ -1267,7 +1270,7 @@ grepfile (char const *file, struct stats *stats)
     status = count + 2;
   else
     {
-      if (count_matches)
+      if (count_matches && (count >= min_count_matches))
         {
           if (out_file)
             {
@@ -1417,6 +1420,7 @@ Miscellaneous:\n\
 \n\
 Output control:\n\
   -m, --max-count=NUM       stop after NUM matches\n\
+      --min-count=NUM       don't print files with less than NUM matches (with -c)\n\
   -b, --byte-offset         print the byte offset with output lines\n\
   -n, --line-number         print line number with output lines\n\
       --line-buffered       flush output on every line\n\
@@ -1769,6 +1773,7 @@ main (int argc, char **argv)
   filename_mask = ~0;
 
   max_count = TYPE_MAXIMUM (off_t);
+  min_count_matches = 0;
 
   /* The value -1 means to use DEFAULT_CONTEXT. */
   out_after = out_before = -1;
@@ -1879,6 +1884,26 @@ main (int argc, char **argv)
         count_matches = 1;
         break;
 
+      case COUNT_MINIMUM_OPTION:
+	{
+	  uintmax_t value;
+	  switch (xstrtoumax (optarg, 0, 10, &value, ""))
+	    {
+	    case LONGINT_OK:
+	      min_count_matches = value;
+	      if (0 <= min_count_matches && min_count_matches == value)
+		break;
+	      /* Fall through.  */
+	    case LONGINT_OVERFLOW:
+	      min_count_matches = TYPE_MAXIMUM (off_t);
+	      break;
+
+	    default:
+	      error (2, 0, _("invalid min count"));
+	    }
+	}
+	break;
+
       case 'd':
         directories = XARGMATCH ("--directories", optarg,
                                  directories_args, directories_types);
