n=int(input())
S=[int(i) for i in input().split()]
q=int(input())
T=[int(i) for i in input().split()]
s=0
for i in range(q):
    if T[i] in S:
        s+=1
print(s) n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i S=[int(i) for i in input().split()] S [int(i) for i in input().split()] q=int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i T=[int(i) for i in input().split()] T [int(i) for i in input().split()] s=0 s 0 for i in range(q):
    if T[i] in S:
        s+=1 i range(q) range q if T[i] in S:
        s+=1 T[i] in S T[i] T i S s+=1 s 1 print(s) print s q=int(input()) int(input()) q n=int(input()) int(input()) n S=[int(i) for i in input().split()] [int(i) for i in input().split()] S s=0 0 s s+=1 1 s T=[int(i) for i in input().split()] [int(i) for i in input().split()] T
n=int(input())
S=[int(i) for i in input().split()]
q=int(input())
T=[int(i) for i in input().split()]
s=0
for i in range(q):
    if T[i] in S:
        s+=1
print(s)
