#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,s,n) for (int i = (s); i < (n); ++i)
#define rrep(i,n,g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define len(x) (int)(x).size()
#define dup(x,y) (((x)+(y)-1)/(y))
#define pb push_back
#define eb emplace_back
#define Field(T) vector<vector<T>>
#define pq(T) priority_queue<T,vector<T>,greater<T>>
using namespace std;
using ll = long long;
using P = pair<int,int>;

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

int main() {
  int n;
  cin >> n;
  unordered_map<int, int> m;
  int x = 1000000000;
  rep(i,0,n) {
    int a;
    cin >> a;
    x = min(x, a);
    for (int i = 1; i*i <= a; ++i) {
      if (a % i != 0) continue;
      if (!m.count(i)) {
        m[i] = a;
      } else {
        m[i] = gcd(m[i], a);
      }
      if (a/i == i) continue;
      if (!m.count(a/i)) {
        m[a/i] = a;
      } else {
        m[a/i] = gcd(m[a/i], a);
      }
    }
  }
  int ans = 0;
  for (auto itr = m.begin(); itr != m.end(); ++itr) {
    if (itr->fi == itr->se && itr->fi <= x) {
      ++ans;
    }
  }
  cout << ans << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
using lli = long long int;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
const int MOD = 1000000007;
const int MOD1 = 998244353;
const int maxn = 100010;
const int lim = (int)1e9;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n = 0;
	cin >> n;
	vector<int> a(n);
	for (auto &i : a)
		cin >> i;
	int mi = *min_element(a.begin(), a.end());
	unordered_map<int, int> mp;
	for (auto &i : a)
	{
		for (int j = 1; j * j <= i && j < mi; ++j)
		{
			if (i % j == 0)
			{
				mp[j] = __gcd(i, mp[j]);
				if (i / j < mi)
					mp[i / j] = __gcd(i, mp[i / j]);
			}
		}
	}
	int res = 1;
	for (auto &i : mp)
		if (i.fi == i.se)
			++res;
	cout << res;
}