def search(S,t):
    for s in S:
        if t == s:
            return True
    return False

n = int(raw_input())
S = map(int,raw_input().split(' '))
q = int(raw_input())
T = map(int,raw_input().split(' '))


ret = 0
for t in T:
    if search(S,t):
        ret += 1
print ret def search(S,t):
    for s in S:
        if t == s:
            return True
    return False search for s in S:
        if t == s:
            return True
     s S if t == s:
            return True
     t == s t s return True True return False False S S t t n = int(raw_input()) n int(raw_input()) int raw_input() raw_input S = map(int,raw_input().split(' ')) S map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' q = int(raw_input()) q int(raw_input()) int raw_input() raw_input T = map(int,raw_input().split(' ')) T map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' ret = 0 ret 0 for t in T:
    if search(S,t):
        ret += 1 t T if search(S,t):
        ret += 1 search(S,t) search S t ret += 1 ret 1 print ret += 1 1 ret q = int(raw_input()) int(raw_input()) q def search(S,t):
    for s in S:
        if t == s:
            return True
    return False def search(S,t):
    for s in S:
        if t == s:
            return True
    return False search ret = 0 0 ret n = int(raw_input()) int(raw_input()) n S = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) S T = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) T
def search(S,t):
    for s in S:
        if t == s:
            return True
    return False

n = int(raw_input())
S = map(int,raw_input().split(' '))
q = int(raw_input())
T = map(int,raw_input().split(' '))


ret = 0
for t in T:
    if search(S,t):
        ret += 1
print ret