source_code: //package Round584;
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.*;
  public class typeA {
  	public static void main(String[] args) {
  		FastReader s = new FastReader();
  		int n = s.nextInt();
  		int[] arr = new int[n];
  		for(int i=0;i<n;i++) {
  			arr[i]=s.nextInt();
  		}
  		boolean[] arr2  = new boolean[n];
  		Arrays.sort(arr);
  		for(int i=0;i<arr2.length;i++) {
  			arr2[i]=true;
  		}
  		//arr2[0]=true;
  		for(int i=0;i<n-1;i++) {
  			for(int j=i+1;j<n;j++) {
  					if(arr[j]%arr[i]==0) {
  						arr2[j]=false;
  					}
  				}
  			}
  		int count=0;
  		for(int i=0;i<n;i++) {
  			if(arr2[i]==true) {
  				count++;
  			}
  		}
  		System.out.println(count);
  	}
  	static class FastReader 
  	
      { 
          BufferedReader br; 
          StringTokenizer st; 
    
          public FastReader() 
          { 
              br = new BufferedReader(new
                       InputStreamReader(System.in)); 
          } 
    
          String next() 
          { 
              while (st == null || !st.hasMoreElements()) 
              { 
                  try
                  { 
                      st = new StringTokenizer(br.readLine()); 
                  } 
                  catch (IOException  e) 
                  { 
                      e.printStackTrace(); 
                  } 
              } 
              return st.nextToken(); 
          } 
    
          int nextInt() 
          { 
              return Integer.parseInt(next()); 
          } 
    
          long nextLong() 
          { 
              return Long.parseLong(next()); 
          } 
    
          double nextDouble() 
          { 
              return Double.parseDouble(next()); 
          } 
    
          String nextLine() 
          { 
              String str = ""; 
              try
              { 
                  str = br.readLine(); 
              } 
              catch (IOException e) 
              { 
                  e.printStackTrace(); 
              } 
              return str; 
          } 
      } 
  	
  }
  