input()
s = set(map(int,input().split()))
n = int(input())
t = tuple(map(int,input().split()))
c = 0
for i in range(n):
    if t[i] in s:
        c += 1
print(c) input() input s = set(map(int,input().split())) s set(map(int,input().split())) set map(int,input().split()) map int input().split() ().split () input split n = int(input()) n int(input()) int input() input t = tuple(map(int,input().split())) t tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split c = 0 c 0 for i in range(n):
    if t[i] in s:
        c += 1 i range(n) range n if t[i] in s:
        c += 1 t[i] in s t[i] t i s c += 1 c 1 print(c) print c c += 1 1 c s = set(map(int,input().split())) set(map(int,input().split())) s n = int(input()) int(input()) n t = tuple(map(int,input().split())) tuple(map(int,input().split())) t c = 0 0 c
input()
s = set(map(int,input().split()))
n = int(input())
t = tuple(map(int,input().split()))
c = 0
for i in range(n):
    if t[i] in s:
        c += 1
print(c)