import java.io.BufferedReader;
import java.io.InputStreamReader;
class whileTest{
public static void main(String args[]) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int counter=0;
String input[] = br.readLine().split(" ");
int n = Integer.parseInt(input[0]);
int divisor = Integer.parseInt(input[1]);
boolean div = (divisor<=Math.pow(10,7)) ? true : false;
if(div){
for(int i=0;i<n;i++){
int divident = Integer.parseInt(br.readLine());
boolean divi = (divident<=Math.pow(10,9)) ? true : false;
if((divi) && (divident%divisor == 0)){
counter++;
}
}
System.out.println(counter);
}
}
}