/*#include <stdio.h>

int main(){

    int x, y;

    scanf("%d%d", &x, &y);

    if(y >= 2x && y <= 4x && y%2 == 0)
        printf("Yes");
    else
        printf("No");

    return 0;
}*/

/*#include <stdio.h>
#include <math.h>

int main(){
    int x, n;
    scanf("%d%d", &x, &n);

    if(n == 0)
        printf("%d", x);
    else{
        int p[101],pp[101];
        int cont = 0;

        for(int i = 0; i < n; ++i){
            scanf("%d", &p[i]);
        }

        for(int t = 0; t < 101; ++t){
            int c = 0;
            for(int s = 0; s < n; ++s){
                if(t == p[s])
                    c = -1;
            }
            if(c == 0){
                pp[cont] = t;
                ++cont;
            }
        }

        int resp = 101;

        for(int k = 0; k < cont; ++k){
             if(abs(pp[k] - x) <= abs(resp - x)){
                if(abs(pp[k] - x) == abs(resp - x)){
                    if(pp[k] < resp)
                        resp = pp[k];
                }
                else
                    resp = pp[k];
             }
        }


        printf("%d", resp);
    }

    return 0;
}*/

#include <stdio.h>
#include <math.h>

int main(){
    int n;
    scanf("%d", &n);
    int cont = 0;
    int vetor [n];

    for(int i = 0; i < n; ++i)
        scanf("%d", &vetor[i]);

    for(int t = 0; t < n; ++t){
        int c = 0;
        for(int s = 0; s < n; ++s){ //24 11 8 3 16
            if(vetor[t]%vetor[s] == 0 && vetor[t] != vetor[s]){
                c = -1;
                break;
            }
        }



        if(c == 0){
            ++cont;
        }


    }

    printf("%d", cont);

    return 0;
}
















