n = int(input())
s = input().split()
for i, x in enumerate(s):
    s[i] = int(x)
q = int(input())
t = input().split()
for i, x in enumerate(t):
    t[i] = int(x)

c = 0
for x_t in t:
    for x_s in s:
        if x_t == x_s:
            c += 1
            break

print(c) n = int(input()) n int(input()) int input() input s = input().split() s input().split() ().split () input split for i, x in enumerate(s):
    s[i] = int(x) i x enumerate(s) enumerate s s[i] = int(x) s[i] s i int(x) int x q = int(input()) q int(input()) int input() input t = input().split() t input().split() ().split () input split for i, x in enumerate(t):
    t[i] = int(x) i x enumerate(t) enumerate t t[i] = int(x) t[i] t i int(x) int x c = 0 c 0 for x_t in t:
    for x_s in s:
        if x_t == x_s:
            c += 1
            break x_t t for x_s in s:
        if x_t == x_s:
            c += 1
            break x_s s if x_t == x_s:
            c += 1
            break x_t == x_s x_t x_s c += 1 c 1 break print(c) print c c += 1 1 c q = int(input()) int(input()) q s = input().split() input().split() s c = 0 0 c n = int(input()) int(input()) n t = input().split() input().split() t
n = int(input())
s = input().split()
for i, x in enumerate(s):
    s[i] = int(x)
q = int(input())
t = input().split()
for i, x in enumerate(t):
    t[i] = int(x)

c = 0
for x_t in t:
    for x_s in s:
        if x_t == x_s:
            c += 1
            break

print(c)
