#include <bits/stdc++.h>

using namespace std;

int n, rs = 0;
map<int, int> M;

void add(int key, int value) {
    M[key] = __gcd(M[key], value);
}

int main() {
#ifdef ACM
    freopen("input", "r", stdin);
#endif
    cin >> n;
    int x, minV = 2e9;
    for (int i = 1; i <= n; i++) {
        cin >> x;
        minV = min(minV, x);
        for (int j = 1; j * j <= x; j++)
            if (x % j == 0) {
                add(j, x);
                if (x / j != j)
                    add(x / j, x);
            }
    }
    for (auto tmp:M) {
        if (tmp.first > minV)
            break;
        rs += (tmp.first == tmp.second);
    }
    cout << rs;
}
#include <bits/stdc++.h>
using namespace std;
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ", "; return os << '}'; }
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#ifdef WA_DEBUG
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif

using ll  = long long;
using ull = unsigned long long;
#define pb push_back
#define fi first
#define se second
#define rep(i,a,b) for(int i=int(a);i<=(int)(b);i++)
#define per(i,a,b) for(int i=int(a);i>=(int)(b);i--)
const int mod  = 1e9+7;
const int inf  = 0x3f3f3f3f;
const int maxn = 1e5+10;
int main() {
#ifndef WA_DEBUG
    ios::sync_with_stdio(false);cin.tie(nullptr);
#endif
    int n;
    cin>>n;
    vector<int> a(n+1);
    int Min=inf;
    rep(i,1,n) {
        cin>>a[i];
        Min=min(a[i],Min);
    }
    set<int> s;
    rep(i,1,n) {
        rep(j,1,maxn) {
            if(j*j>a[i]) break;
            if(a[i]%j==0) {
                s.insert(j);
                if(j*j!=a[i]) s.insert(a[i]/j);
            }
        }
    }
    int cnt=0;
    for(int x:s) {
        if(x>Min) continue;
        int ans=-1;
        rep(i,1,n) {
            if(ans==1) break;
            if(a[i]%x==0) {
                if(ans==-1) ans=a[i]/x;
                else ans=__gcd(ans,a[i]/x);
            }
        }
        if(ans==1&&x<=Min) cnt++;
    }
    cout<<cnt<<'\n';
    return 0;
}

