#include <bits/stdc++.h>
using namespace std;
const int MAXM = 100;
const int MOD = 1000000007;
int cnt[10];
template <class T>
class Matrix {
 public:
  T data[MAXM][MAXM];
  Matrix(int x) {
    memset(data, 0, sizeof(data));
    int i, k;
    for (i = 0; i < MAXM; i++) {
      for (k = 1; k <= 9; k++) {
        data[i][(i * 10 + k) % x] += cnt[k];
      }
    }
  }
  Matrix() { memset(data, 0, sizeof(data)); }
  Matrix operator*(const Matrix& a) {
    Matrix ret;
    int i, j, k;
    for (i = 0; i < MAXM; i++) {
      for (j = 0; j < MAXM; j++) {
        if (data[i][j] != 0) {
          for (k = 0; k < MAXM; k++) {
            ret.data[i][k] += 1LL * data[i][j] * a.data[j][k] % MOD;
            ret.data[i][k] %= MOD;
          }
        }
      }
    }
    return ret;
  }
  Matrix operator^(int e) {
    Matrix ret;
    Matrix tmp = *this;
    int i;
    for (i = 0; i < MAXM; i++) ret.data[i][i] = 1;
    while (e) {
      if (e & 1) ret = ret * tmp;
      tmp = tmp * tmp;
      e >>= 1;
    }
    return ret;
  }
};
int iv[105];
int main() {
  int n, b, k, x, i, j;
  cin >> n >> b >> k >> x;
  for (i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    cnt[tmp]++;
  }
  Matrix<int> matrix(x);
  matrix = matrix ^ b;
  int ans = 0;
  cout << matrix.data[0][k] << endl;
  return 0;
}
