#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int N;
    cin >> N;

    vector<int> A(N);
    for(int i = 0; i < N; ++i){
        cin >> A[i];
    }

    const int MIN_ELEM = *min_element(A.begin(), A.end());
    unordered_map<int, int> memo;
    memo[MIN_ELEM] = MIN_ELEM;
    for(int i = 0; i < N; ++i){
        for(int d = 1; d * d <= A[i]; ++d){
            if(A[i] % d == 0){
                for(int divisor: set<int>{d, A[i] / d}){
                    memo[divisor] = (memo.count(divisor) ? __gcd(memo[divisor], A[i]) : A[i]);
                }
            }
        }
    }

    int answer = 0;
    for(const pair<int, int>& P: memo){
        answer += (P.first == P.second && P.first <= MIN_ELEM);
    }

    cout << answer;

    return 0;
}
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

template <typename A, typename B> ostream& operator <<(ostream& out, const pair<A, B>& a) { out << "(" << a.first << "," << a.second << ")"; return out; }
template <typename T, size_t N> ostream& operator <<(ostream& out, const array<T, N>& a) { bool f = 1; out << "["; for (auto& v : a) { out << (f ? "" : ", ") << v; f = 0; } out << "]"; return out; }
template <typename T> ostream& operator <<(ostream& out, const vector<T>& a) { bool f = 1; out << "["; for (auto& v : a) { out << (f ? "" : ", ") << v; f = 0; } out << "]"; return out; }
template <typename T, class Cmp> ostream& operator <<(ostream& out, const set<T, Cmp>& a) { bool f = 1; out << "{"; for (auto& v : a) { out << (f ? "" : ", ") << v; f = 0; } out << "}"; return out; }
template <typename U, typename T, class Cmp> ostream& operator <<(ostream& out, const map<U, T, Cmp>& a) { bool f = 1; out << "{"; for (auto& p : a) { out << (f ? "" : ", ") << p.first << ":" << p.second; f = 0; } out << "}"; return out; }
#ifdef LOCAL_DEBUG
#define dbg(...) __dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define dbg(...) 42
#endif
template <typename Arg1> void __dbg(const char* name, Arg1&& arg1){ cerr << name << ": " << arg1 << endl; }
template <typename Arg1, typename... Args> void __dbg(const char* names, Arg1&& arg1, Args&&... args){ const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << ": " << arg1 << " |"; __dbg(comma + 1, args...); }

int gcd(int a, int b)
{
    while (1) {
        if (a) b %= a; else return b;
        if (b) a %= b; else return a;
    }
}

template<class T> void sort_unique(vector<T> &v) {
	sort(v.begin(), v.end());
	v.erase(unique(v.begin(), v.end()), v.end());
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto &it: a) cin >> it;
    sort_unique(a);

    vector<int> divs;
    for (auto x: a) {
        for (ll i = 1; i*i <= x; ++i) if (x % i == 0) {
            if (i <= a[0]) divs.push_back(i);
            if (x/i <= a[0]) divs.push_back(x/i);
        }
    }
    sort_unique(divs);

    int an = 0;
    for (auto x: divs) {
        int g = 0;
        for (auto y: a) {
            if (y % x == 0) g = gcd(g, y);
        }
        if (g == x) ++an, dbg(x);
    }

    cout << an << '\n';
    return 0;
}
