#include <bits/stdc++.h>
using namespace std;
int true_mod(int A, int N) {
  A %= N;
  if (A < 0) A += N;
  return A;
}
const long long MOD = 1000LL * 1000LL * 1000LL + 7LL;
const int MX = 109;
struct matrix {
  long long A[MX][MX];
};
int x;
void output(const matrix& A) {
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < x; j++) cout << A.A[i][j] << ' ';
    cout << endl;
  }
}
matrix operator*(const matrix& A, const matrix& B) {
  matrix R;
  for (int i = 0; i < x; i++) {
    for (int k = 0; k < x; k++) {
      long long t = 0;
      for (int j = 0; j < x; j++) t += A.A[i][j] * B.A[j][k] % MOD;
      R.A[i][k] = t % MOD;
    }
  }
  return R;
}
matrix unity() {
  matrix R;
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) R.A[i][j] = (i == j ? 1 : 0);
  return R;
}
matrix power(const matrix& A, int N) {
  matrix R = unity(), A_pow = A;
  while (N != 0) {
    if (N % 2 == 1) R = R * A_pow;
    A_pow = A_pow * A_pow;
    N /= 2;
  }
  return R;
}
int n, b, k;
const long long B = 10;
int cnt_D[MX] = {0};
matrix get_A() {
  matrix R;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < x; j++) {
      int smth = true_mod(j - 10 * i, x);
      R.A[i][j] = cnt_D[smth];
    }
  }
  return R;
}
int main() {
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    cnt_D[a % x]++;
  }
  matrix A = get_A();
  matrix A_pow = power(A, b);
  cout << A_pow.A[0][k];
  return 0;
}
