#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
const long long WYMIAR = 100;
struct M {
  long long t[WYMIAR][WYMIAR];
  M() {
    for (long long i = 0; i < (WYMIAR); ++i)
      for (long long j = 0; j < (WYMIAR); ++j) t[i][j] = 0;
  }
};
M operator*(const M &a, const M &b) {
  M res;
  for (long long i = 0; i < (WYMIAR); ++i)
    for (long long j = 0; j < (WYMIAR); ++j) {
      long long acc = 0;
      for (long long k = 0; k < (WYMIAR); ++k)
        acc += (long long)a.t[i][k] * b.t[k][j] % mod;
      res.t[i][j] = acc % mod;
    }
  return res;
}
M potega(M x, long long n) {
  M res, acc = x;
  for (long long i = 0; i < (WYMIAR); ++i) res.t[i][i] = 1;
  while (n) {
    if (n & 1) res = res * acc;
    acc = acc * acc;
    n /= 2;
  }
  return res;
}
int main() {
  long long n, b, k, x;
  cin >> n >> b >> k >> x;
  vector<long long> digits(10);
  for (long long i = 0; i < (n); ++i) {
    long long temp;
    cin >> temp;
    digits[temp]++;
  }
  M inp;
  inp.t[0][0] = 1;
  M moje;
  for (long long i = 0; i <= x - 1; i++) {
    long long trueI = i * 10;
    for (long long j = 1; j <= 9; j++) {
      long long suma = (trueI + j) % x;
      moje.t[i][suma] += digits[j];
    }
  }
  inp = inp * potega(moje, b);
  cout << inp.t[0][k];
  return 0;
}
