
// Problem: F - GCD or MIN
// Contest: AtCoder - AtCoder Beginner Contest 191
// URL: https://atcoder.jp/contests/abc191/tasks/abc191_f
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define vi vector<int>
#define vll vector<ll> 
#define all(x) (x).begin() , (x).end()

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rnd(x, y) uniform_int_distribution<ll>(x, y)(rng)

void dbg(){
	cerr << endl;
}
template<typename Head , typename... Tail>
void dbg(Head h , Tail... t){
	cerr << h << " ";
	dbg(t...);
}

#ifdef EMBI_DEBUG
#define debug(...) cerr << "(" << #__VA_ARGS__  << "): ", dbg(__VA_ARGS__)
#else 
#define debug(...)
#endif

const int max_n = 1e5 + 9;
const int mod = 1e9 + 7;
const int inf = 1e9;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
ll power(ll a , ll b)
{
    ll prod = 1;
    while(b)
    {
        if(b&1)
        prod = (prod*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return prod;
}
void solve(){
	int n;
	cin >> n;
	int a[n];
	for(int i = 0 ; i < n ; i++){
		cin >> a[i];
	}
	
	sort(a , a+n);
	
	map<int , int> m;
	
	for(int i = 0 ; i < n ; i++){
		for(ll j = 1 ; j*j <= a[i] ; j++){
			if(a[i] % j == 0){
				m[j] = __gcd(m[j] , a[i]);
				m[a[i]/j] = __gcd(m[a[i]/j] , a[i]);
			}
		}
	}
	
	int ans = 0;
	for(auto it : m){
		if(it.ff == it.ss && it.ff <= a[0])ans++;
	}
	cout << ans << "\n";
}
signed main(){
	int t = 1;
	// cin >> t;
	for(int i = 1 ; i <= t ; i++){
		solve();
	}
}

#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;
}
