class Codechef{
public static void main(String[] args) {
// System.in and System.out are input and output streams, respectively.
Scanner scn = new Scanner(System.in);
int r = scn.nextInt();
int k = scn.nextInt();
int count=0;
for(int i = 0 ; i < r ; i++){
int n = scn.nextInt();
if(n %k==0){
count++;
}
}
System.out.println(count);
}
}