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

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

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

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

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

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

print c