com o awk
awk -v nb=3 '{for(i=1;i<=NF;i++)if(++a[$i]>nb){print;next}}' infile
for(i=1;i<=NF;i++) on each field of the line
++a[$i] get each field in a associative array a and incremente it each time we saw a field with the same value.
if(++a[$i]>nb) if the value is more than nb
{print;next} print the line and jump to the next line
Para mostrar apenas a linha com nb
awk -v nb=3 '
{
max = 0
delete a
for ( i=1 ; i<=NF ; i++ )
++a[$i]
for( j in a )
max = a[j]>max ? a[j] : max
if ( max == nb )
print
}' infile