#include <stdio.h>

#define N 100000
int hash[100003];
int *hash2=hash+100000;


void input(int n){
	int *p;
	n=n+1;
	p=hash+n%N;
	while (*p) {
		if (*p==n) return;
		if (++p==hash2) p=hash;
	}
	*p=n;
}

int input2(){
  int n=0;
  int c=getchar_unlocked();
	do n=10*n+(c & 0xf),c=getchar_unlocked();while(c>='0');
	return n;
}

int main(){
	int n1,n2,n3;

	n1=input2();
	while(n1--)input(input2());

	n3=0;
	n2=input2();
	while(n2--) if(search(input2())) n3=n3+1;
	
	printf("%d\n",n3);
	return 0;
}
int search(int n){
	int *p;
	n=n+1;
	p=hash+n%N;
	while(*p){
		if(*p==n)return 1;
		if(++p==hash2)p=hash;
	}
	return 0;
}



