import java.util.Scanner;
class cc3
{
public static void main(String a[])
{
Scanner in = new Scanner(System.in);
String k = in.nextLine();
String[] no = k.split(" ");
Double x = Double.parseDouble(no[0]);
Double y = Double.parseDouble(no[1]);
int c = 0;
for(int i=0;i<x;i++)
{
int z = in.nextInt();
if(z%y==0)
c++;
}
System.out.println(c);
}
}