-----
RANJANA QUIZ
-----

Prof. Ranjana decided to conduct a quiz in her class. She divided all the students of her
class into groups of three. Consider that no student was left out after the division. She gave
different sets of questions to every group. A set is said to be unique if there is no other team that
received the same number of maths, science and english questions. In every set, maximum
questions for each group were related to maths, then science, and the least number of
questions were related to English. Total number of questions given to each team can be
different. 

	
	

After the test, the CR of the class asked every team to report the number of questions
they got on each subject. The CR wants to know the number of unique sets of questions that
were given to the teams, the problem is that all the students have just submitted the number of
questions of each subject but in no particular order. Help the CR to find the number of unique
sets

		
		

-----Input Format-----

Line 1 contains the number of teams ‘n’. In the next n lines, each line contains three space separated integers,i.e, the number of questions of each subject(in no particular order).
employee

-----Output-----

Print the number of unique sets

		
		

-----Example Text Case-----
Input:

5
6 5 4
2 3 7
4 6 5
7 2 3
5 3 1
	
Output:
1
		

Starter code:

Solutions:
n=int(input())
l=[]
count=0
while n:
    n-=1
    a,b,c=sorted(map(int,input().split()))
    if (a,b,c) in l:
        count-=1
    else:
        l.append((a,b,c))
        count+=1
print(count)

try:
    s=[]
    for i in range(int(input())):
        n=list(map(int,input().split()))
        n.sort()
        s.append(n)
    unique=[]
    for i in s:
        if(s.count(i)==1):
            unique.append(i)
        else:
            continue
    print(len(unique))
            
except:
    pass

#
n = int(input())
ans = {}
count=0
for _ in range(n):
    arr = list(map(int,input().split()))
    temp=sum(arr)
    if temp in ans:
        ans[temp]+=1  
    else:
        ans[temp]=1
count=0
for i in list(ans.values()):
    if i == 1:
        count+=1 
print(count)


n=int(input())
d=dict()
for i in range(n):
    l=list(map(int,input().split(' ')))
    l1=[]
    l1.append(max(l))
    l1.append(sum(l)-(l1[0]+min(l)))
    l1.append(min(l))
    t=tuple(l1)
    try:
        d[t]+=1
    except:
        d[t]=0
c=0
for i in d:
    if(d[i]==0):
        c+=1
print(c)

# cook your dish here
l=[]
for i in range(int(input())):
    t=list(set(list(map(int,input().split()))))
    if t not in l:
        l.append(t)
    else:
        l.remove(t)
print(len(l))

n=int(input())
k=0
d={}
for _ in range(n):
    a=list(map(int,input().split()))
    a.sort()
    a=str(a)
    if a in d.keys():
        d[a]=d[a]+1
    else:
        d[a]=1
for key in d:
    if(d[key]==1):
        k=k+1
print(k)

n=int(input())
d={}
s=0
for i in range(n):
    t=list(map(int,input().split()))
    t.sort()
    t=tuple(t)
    if t in d:
        d[t]=d[t]+1
        s=s-1
    else:
        d[t]=1
        s=s+1


print(s)
    


s=[]
res=0
for _ in range(int(input())):
    a=list(map(int,input().split()))
    a.sort()
    s.append(a)
# ss=list(ss)
for _ in range(len(s)):
    if s.count(s[_])==1:
        res+=1
print(res)        

# cook your dish here
try:
    n = int(input())
    arr = []
    for i in range(n):
        arr.append(list(map(int,input().split(" "))))
    out = list(map(sorted,arr))
    dic = {}
    for elem in out:
        #print("elem:",elem)
        dic.setdefault(tuple(elem),list()).append(1)
    for k,v in list(dic.items()):
        dic[k]=sum(v)
    unique_set=0
    for v in list(dic.values()):
        if v == 1:
            unique_set+=1
    print(unique_set)
            

except:
    pass
    
    
        


# cook your dish here
try:
    n = int(input())
    arr = []
    for i in range(n):
        arr.append(list(map(int,input().split(" "))))
    out = list(map(sorted,arr))
    dic = {}
    for elem in out:
        #print("elem:",elem)
        dic.setdefault(tuple(elem),list()).append(1)
    for k,v in list(dic.items()):
        dic[k]=sum(v)
    unique_set=0
    for v in list(dic.values()):
        if v == 1:
            unique_set+=1
    print(unique_set)
            

except:
    pass
    
    
        


# cook your dish here
n = int(input())
lst = []

for i in range(n):
    l1 = list(map(int, input().split()))
    l1.sort()
    if l1 not in lst:
        lst.extend([l1])
    else:
        lst.remove(l1)
    


print(len(lst))

# cook your dish here
n=int(input())
lst=[]
unique=0
for _ in range(n):
    a=list(map(int,input().split()))
    a.sort(reverse=True)
    lst.append(a)
for ele in lst:
    if(lst.count(ele)==1):
        unique+=1
print(unique)

# cook your dish here
try:
    cnt=0
    l=[]
    d={}
    t=tuple()
    for _ in range(int(input())):
        w=[int(i) for i in input().split()]
        w.sort()
        l.append(w)
    # print(l)
    t=tuple(l)
    # print(t)
    for i in t:
        if tuple(i) not in d:
            d[tuple(i)]=1
        else:
            d[tuple(i)]+=1
    # print(d)
    for i in d:
        if d[i]==1:
            cnt+=1
    print(cnt)
except EOFError as e: 
    pass

n = int(input())
A = {}
for i in range(n):
    a = list(map(int, input().split()))
    a.sort()
    for i in range(3):
        a[i] = str(a[i])
    s = ''.join(a)
    if s in A:
        A[s] += 1
    else:
        A[s] = 1

count = 0
for i in A:
    if A[i] == 1:
        count += 1
print(count)

# cook your dish here
n=int(input())
dct=dict()
c=0
for i in range(n):
    x=input()
    for j in x:
        if j.isdigit():
            if j in list(dct.keys()):
                dct[j]+=1
            else:
                dct[j]=1
for k in dct:
    if dct[k]==1:
        c+=1
print(c)


# cook your dish here
from collections import Counter

quiz_set = []

for question_set in range(int(input())):
    qs = tuple(sorted(map(int, input().split())))
    quiz_set.append(qs)

# print(quiz_set)
quiz_set = Counter(quiz_set)
# print(quiz_set)

unique_counts = list(quiz_set.values()).count(1)

print(unique_counts)

try:
    n=int(input())
    my_list=[]
    for i in range(n):
        marks = list(map(int,input().split()))
        marks=sorted(marks)
        my_list.append(marks)
        
    unique=0
    i=0
    while i<len(my_list):
        if my_list.count(my_list[i])==1:
            unique+=1
        i+=1
    print(unique)
except:
    pass

# cook your dish here
from sys import stdin, stdout
input = stdin.readline
from collections import defaultdict as dd
import math
def geti(): return list(map(int, input().strip().split()))
def getl(): return list(map(int, input().strip().split()))
def gets(): return input()
def geta(): return int(input())
def print_s(s): stdout.write(s+'\n')

def solve():
    occur=dd(int)
    n=geta()
    a=[]
    for i in range(n):
        temp=getl()
        temp.sort(reverse=True)
        # print(temp)
        a.append(tuple(temp))
        occur[a[-1]]+=1
    ans=0
    for i in a:
        if occur[i]==1:
            ans+=1
    print(ans)



def __starting_point():
    solve()

__starting_point()

# cook your dish here
import sys
n=int(input().strip())
diz={}
counter=0
for _ in range(n):
    values=list(map(int, input().strip().split()))
    values.sort(reverse=True)
    values=tuple(values)
    if values not in diz:
        diz[values]=1 
        counter+=1 
    else:
        if diz[values]==1:
            counter-=1 
            diz[values]=0
print(counter)


n=int(input())
l=[]
for i in range(n):
    a,b,c=list(map(int,input().split()))
    t=[a,b,c]
    l.append(sorted(t))

l.sort()
l1=[]
for i in l:
    l1.append(l.count(i))
counter=0
for i in l1:
    if i==1:
        counter+=  1
print(counter)




n=int(input())
a=[sorted(list(map(int,input().split()))) for i in range(n)];c=0
for j in range(n):
    if a.count(a[j])==1:
        c=c+1
print(c)

# cook your dish here
n=int(input())
l=[]
for i in range(n):
    x=list(map(int,input().split()))
    x.sort(reverse=True)
    l.append(x)
s=0
for i in range(n):
    c=0
    for j in range(n):
        if(l[i]==l[j]):
            c+=1
    if(c==1):
        s+=1
print(s)


n=int(input())
ar = [sorted(list(map(int,input().split()))) for i in range(n)]
c=0
for j in range(n):
    if ar.count(ar[j])==1:
        c+=1
    else:
        pass
print(c)

from collections import Counter
l = []
for _ in range(int(input())):
    s = list(map(int, input().split()))
    s = sorted(s)
    l.append(tuple(s))

c = Counter(l)
t=0
for v in list(c.values()):
    if v==1:
        t+=1
print(t)


# cook your dish here
n=int(input())
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
    l[i].sort()
countu=0
for i in l:
    if l.count(i)==1:
        countu+=1
print(countu)