#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)
#define bit(n,k) ((n>>k)&1) //nのk　bit目
#define vec(T) vector<T>
#define vvec(T) vector<vector<T>>
using ll = long long;
using P = pair<int,int>;


template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll llINF = 1LL << 60;
const int iINF = 1e9;

//------------------------------------------------


struct Solver{
    // 最大公約数
    int gcd(int a, int b){
    if (a%b == 0) return(b);
    else return(gcd(b, a%b));
    }

    void solve(){
        int N;
        cin >> N;

        map<int,int> mp;

        auto mpadd = [&](int ai, int xi){
            int p = mp[xi];
            mp[xi] = gcd(p,ai);
        };

        int amin=iINF;
        rep(i,N){
            int A; cin >> A;
            chmin(amin,A);
            for(int x=1; x*x <=A ; x++){
                if(A%x) continue;
                mpadd(A,x);
                mpadd(A,A/x);
            }
        }

        int ans = 0;
        for(auto mi:mp){
            if(mi.first <= amin && mi.first == mi.second ) ans++;
        }
        cout << ans << endl;
 
    }
};


int main(){
    int testcasenum=1;
    //cin >> testcasenum;
    rep1(ti,testcasenum){
        Solver solver;
        solver.solve();
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define M  100000000000000000
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define PI 3.14159265
#define pb push_back
#define LLMX LONG_LONG_MAX
#define LLMN LONG_LONG_MIN
#define double long double
int n ;
vector < int > arr ; 
signed main()
{ 
  fastio ; 
  cin >> n ;
  set < int > st ; 
  for(int x = 0 ; x <= n-1 ; x++)
  {
    int t; 
    cin >> t ; 
    arr.pb(t)  ;
  }
  sort(arr.begin() , arr.end())  ;
  int small = arr[0] ;
  map < int , int > dp ;  
  int ans = 1 ; 
  for(int x = 0 ; x <= n-1 ; x++)
  {
    for(int i = 1 ;  i <= sqrt(arr[x]) ; i++)
    {
      if( arr[x] % i !=0)
      continue ; 
      if( i < small)
      {
        st.insert(i) ;
        if( dp[i] == 0)
        dp[i] = arr[x] ; 
        else
        dp[i] = __gcd( dp[i] , arr[x]) ;
       // cout << i << " " << dp[i] << "\n" ;
      } 
      if( arr[x]/i < small)
      {
        st.insert( arr[x]/i) ; 
        if( dp[arr[x]/i] == 0)
        dp[arr[x]/i] = arr[x] ; 
        else
        dp[arr[x]/i] = __gcd( dp[arr[x]/i] , arr[x]) ;
        //cout << i << " " << dp[i] << "\n" ;

      } 
    }
  }
  for(auto it = st.begin() ; it != st.end() ; it++)
  {
    if( dp[*it] == *it)
    ans++ ;
  }
  cout << ans << "\n" ;

  
  

}