#include"bits/stdc++.h"
using namespace std;
#define ri register int
#define ll long long
#define N 2010
int n,a[N],mn=0x3f3f3f3f;
inline int get_gcd(int x,int y){
    return !y?x:get_gcd(y,x%y);
}
unordered_map<int,int>vis;
int main(){
    ios::sync_with_stdio(false);
    cin>>n;
    for(ri i=1;i<=n;++i){
        cin>>a[i];mn=min(mn,a[i]);
    }
    for(ri i=1;i<=n;++i){
        for(ri j=1;j*j<=a[i]&&j<=mn;++j){
            if(a[i]%j==0){
                //cout<<a[i]<<" "<<j<<endl;
                vis[j]=get_gcd(a[i],vis[j]);
                if(a[i]/j<=mn) vis[a[i]/j]=get_gcd(vis[a[i]/j],a[i]);
            }   
        }    
    }
    int ans=0;
    for (auto x : vis)
    if (x.first == x.second) ans++;
    cout<<ans;
    return 0;
}
#include <cstdio>
#include <cmath>
#include <iostream>
#include <set>
#include <algorithm>
#include <vector>
#include <map>
#include <cassert>
#include <string>
#include <cstring>
#include <queue>

using namespace std;

#define rep(i,a,b) for(int i = a; i < b; i++)
#define S(x) scanf("%d",&x)
#define S2(x,y) scanf("%d%d",&x,&y)
#define P(x) printf("%d\n",x)
#define all(v) v.begin(),v.end()
#define FF first
#define SS second
#define pb push_back
#define mp make_pair

typedef long long int LL;
typedef pair<int, int > pii;
typedef vector<int > vi;

map<int, vi > M;
map<int, vi >::iterator it;

int gcd(int a, int b) {
  if(b == 0) return a;
  return gcd(b, a % b);
}

int main() {
  int n;
  S(n);

  int mn = 1000000000;
  rep(i,1,n+1) {
    int x;
    S(x);
    mn = min(mn, x);
    for(int j = 1; j * j <= x; j++) if(x % j == 0) {
      M[j].pb(x);
      if(j * j != x) M[x / j].pb(x);
    }
  }

  int ans = 0;
  for(it = M.begin(); it != M.end(); it++) {
    if(it->FF > mn) break;
    int g = 0;
    rep(i,0,it->SS.size()) {
      g = gcd(it->SS[i], g);
    }
    ans += g == it->FF;
  }
  P(ans);
  return 0;
}
