#include "bits/stdc++.h"
//#include "atcoder/all"
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i,l,r)for(int i=(l);i<(r);++i)
#define rrep(i, n) for (int i = (n-1); i >= 0; --i)
#define rrep2(i,l,r)for(int i=(r-1);i>=(l);--i)
#define all(x) (x).begin(),(x).end()
#define allR(x) (x).rbegin(),(x).rend()
#define endl "\n"

long long gcd(long long a, long long b) {
	if (b == 0) return a;
	else return gcd(b, a%b);
}
long long lcm(long long x, long long y) {
	return x * y / gcd(x, y);
}
unordered_map<int, int>mp;
//約数列挙
void calc(const int &N) {
	for (int i = 1; i <= sqrt(N); i++) {
		if (0 == N % i) {
			mp[i] = gcd(mp[i], N);
			if (N != i * i) {
				mp[N / i] = gcd(mp[N / i], N);
			}
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int N;
	cin >> N;
	vector<int>A(N);
	rep(i, N) {
		cin >> A[i];
	}
	int minA = 1e9;
	rep(i, N) {
		minA = min(minA, A[i]);
	}
	rep(i, N) {
		calc(A[i]);
	}
	int ans = 0;
	for (auto p : mp) {
		if ((p.first <= minA) && (p.first == p.second)) {
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}
#include<iostream>
#include<cstdio>
#include<cstring>
#include<map>
#include<algorithm>
#define N 200005
using namespace std;
int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return x*f;
}
int n,a[N],maxn=0x3f3f3f3f;
map<int,int>f;
map<int,int>::iterator it;
int main()
{
	n=read();
	for(int i=1;i<=n;i++)a[i]=read(),maxn=min(maxn,a[i]);
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j*j<=a[i]&&j<maxn;j++)
		{
			if(a[i]%j==0)
			{
				if(f[j]==0)f[j]=a[i];
				else f[j]=__gcd(f[j],a[i]);
				if(a[i]/j<maxn)
				{
					int x=a[i]/j;
					if(f[x]==0)f[x]=a[i];
					else f[x]=__gcd(f[x],a[i]);
				}
			}
		}
	}
	int ans=0;
	for(it=f.begin();it!=f.end();it++)
	{
		ans+=(it->first==it->second);
	}
	printf("%d\n",ans+1);
}
