#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > iden(int n) {
  vector<vector<long long> > a;
  a.resize(n);
  for (int i = 0; i < n; i++) a[i].assign(n, 0);
  for (int i = 0; i < n; i++) a[i][i] = 1;
  return a;
}
vector<vector<long long> > matrixmulti(vector<vector<long long> > m1,
                                       vector<vector<long long> > m2) {
  vector<vector<long long> > m3;
  int a = m1.size(), b = m1[0].size(), c = m2.size(), d = m2[0].size();
  if (b != c) cout << "CANNOT MULTIPLY" << endl;
  m3.resize(a);
  for (int i = 0; i < a; i++) m3[i].assign(d, 0);
  for (int i = 0; i < a; i++) {
    for (int j = 0; j < d; j++) {
      m3[i][j] = 0;
      for (int k = 0; k < b; k++)
        m3[i][j] = (m3[i][j] + (m1[i][k] * 1ll * m2[k][j]) % 1000000007LL) %
                   1000000007LL;
    }
  }
  return m3;
}
vector<vector<long long> > matrixpower(vector<vector<long long> > a, int n) {
  if (n == 0) return iden(a.size());
  vector<vector<long long> > res = iden(a.size());
  vector<vector<long long> > b = a;
  while (n) {
    if (n & 1) res = matrixmulti(res, b);
    b = matrixmulti(b, b);
    n >>= 1;
  }
  return res;
}
vector<vector<long long> > make(int k) {
  vector<vector<long long> > res;
  res.resize(k);
  for (int i = 0; i < k; i++) res[i].assign(k, 0);
  return res;
}
vector<vector<long long> > makebase(int k, vector<int> cnt) {
  vector<vector<long long> > res;
  res.resize(k);
  for (int i = 0; i < k; i++) {
    res[i].resize(1);
    res[i][0] = 0;
  }
  res[0][0] = 1;
  return res;
}
int main() {
  int n, b, k, x;
  scanf("%d", &n);
  scanf("%d", &b);
  scanf("%d", &k);
  scanf("%d", &x);
  vector<int> cnt(10, 0);
  for (int i = 0; i < n; i++) {
    int ab;
    scanf("%d", &ab);
    cnt[ab]++;
  }
  vector<vector<long long> > A = make(x);
  vector<vector<long long> > B = makebase(x, cnt);
  for (int i = 0; i < x; i++) {
    for (int j = 1; j < 10; j++) {
      int p = (i * 10 + j) % x;
      A[p][i] += cnt[j];
    }
  }
  vector<vector<long long> > res = matrixpower(A, b);
  res = matrixmulti(res, B);
  long long ans = res[k][0];
  cout << ans;
  return 0;
}
