#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

#define MAX_N 200000

int A[MAX_N + 1];

int main( int argc, char **argv )
{
    int N;
    cin >> N;

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

    vector<int> B;

    for ( int i = 0; i < N; i++ )
    {
        auto a = A[i];
        auto divisible = false;

        for ( auto b : B )
        {
            if ( !( a % b ) )
            {
                divisible = true;
                break;
            }
        }

        if ( !divisible ) B.push_back( a );
    }

    auto ans = B.size();
    for ( auto b : B )
    {
        auto i = binary_search( A, A + N, b );
        if ( i < N && A[i] == b ) { ans--; }
    }

    cout << ans << endl;

    return 0;
}
