#!/usr/bin/perl

use v5.30;
use strict;

my $valid = 0;
LINE:
while (<>) {
	chomp;
	my %seen;
	for my $w (split /\s+/) {
		next LINE if $seen{$w}++;
	}
	$valid++;
}

say $valid;
		
