program answer
  implicit none

  integer :: N, i, j, count, ans
  integer, allocatable :: A(:)
  read(*,*) N
  allocate(A(N))
  read(*,*) A

  count = 0
  ans = 0
  do i = 1, N
     count = 0
     do j = 1, N
        if(j==i) then
           cycle
        end if
        if(mod(A(i),A(j))==0) then
           count = 0
           exit
        end if
        count = count + 1
     end do
      if(count==N-1) then
         ans = ans + 1
      end if
   end do

   write(*,*) ans

   deallocate(A)
   stop
  end program answer
     

  
