#include <stdio.h>
int inearSearch(int *, int, int);

int main() {
  int n,S[10000],q,T[500],i,C = 0;

  scanf("%d",&n);
  for(i = 0; i< n; i++) {
    scanf("%d",&S[i]);
  }
  scanf("%d",&q);
  for(i = 0; i < q; i++) {
    scanf("%d",&T[i]);
  }

  for(i = 0; i < q; i++) {
    if(inearSearch(S,n,T[i]) == 0) C++;
      }
  
  printf("%d\n",C);

  return 0;
}

int inearSearch(int *S, int n, int T) {
  int i = 0,key;
  S[n] = key;
  while(S[i] != key) i++;
  return i != n;
}