n = int(input())
s = [int(i) for i in input().split()]
q = int(input())
t = [int(i) for i in input().split()]
ans = 0
for i in range(q):
    for j in range(n):
        if t[i] == s[j]:
            ans += 1
            break
print(ans) 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()] ans = 0 ans 0 for i in range(q):
    for j in range(n):
        if t[i] == s[j]:
            ans += 1
            break i range(q) range q for j in range(n):
        if t[i] == s[j]:
            ans += 1
            break j range(n) range n if t[i] == s[j]:
            ans += 1
            break t[i] == s[j] t[i] t i s[j] s j ans += 1 ans 1 break print(ans) print ans ans += 1 1 ans q = int(input()) int(input()) q t = [int(i) for i in input().split()] [int(i) for i in input().split()] t ans = 0 0 ans n = int(input()) int(input()) n s = [int(i) for i in input().split()] [int(i) for i in input().split()] s
n = int(input())
s = [int(i) for i in input().split()]
q = int(input())
t = [int(i) for i in input().split()]
ans = 0
for i in range(q):
    for j in range(n):
        if t[i] == s[j]:
            ans += 1
            break
print(ans)
