#include <bits/stdc++.h>#define N 1001
using namespace std;
//ifstream fin("date.in");//ofstream fout("date.out");
int n, x, y;int main(){ int cnt = 0, i; cin >> n >> x; for(i = 1; i <= n; i++){ cin >> y; if(y % x == 0 && y != 0) cnt++; }
cout << cnt;
return 0;}