#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-10;
double zero(double d) { return d < EPS ? 0.0 : d; }
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  return os << '(' << p.first << ',' << p.second << ')';
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (int i = 0; i < (int)(a.size()); i++) os << (i ? " " : "") << a[i];
  return os << ']';
}
string toString(int i) {
  stringstream ss;
  ss << i;
  return ss.str();
}
const int MOD = 1000000007;
long long fpow(long long a, long long k, int M) {
  long long res = 1ll;
  long long x = a;
  while (k != 0) {
    if ((k & 1) == 1) res = (res * x) % M;
    x = (x * x) % M;
    k >>= 1;
  }
  return res;
}
struct prepare {
  prepare() {
    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(8);
    ios_base::sync_with_stdio(false);
  }
} _prepare;
int x;
vector<vector<int> > mul(vector<vector<int> > &A, vector<vector<int> > &B) {
  vector<vector<int> > C(A.size(), vector<int>(B[0].size()));
  for (int i = 0; i < (int)(A.size()); i++) {
    for (int k = 0; k < (int)(B.size()); k++) {
      for (int j = 0; j < (int)(B[0].size()); j++) {
        C[i][j] =
            ((long long)C[i][j] + ((long long)A[i][k] * B[k][j]) % MOD) % MOD;
      }
    }
  }
  return C;
}
vector<vector<int> > pow(vector<vector<int> > A, long long n) {
  vector<vector<int> > B(A.size(), vector<int>(A.size()));
  for (int i = 0; i < (int)(A.size()); i++) B[i][i] = 1;
  while (n > 0) {
    if (n & 1) B = mul(B, A);
    A = mul(A, A);
    n >>= 1;
  }
  return B;
}
void dbg(vector<vector<int> > &t) {
  for (int i = 0; i < (int)(t.size()); i++) {
    for (int j = 0; j < (int)(t[0].size()); j++) {
      cout << t[i][j] << " ";
    }
    cout << endl;
  }
}
int main() {
  int n, b, k;
  cin >> n >> b >> k >> x;
  vector<int> nums(x, 0);
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    nums[a % x]++;
  }
  vector<vector<int> > mat(x, vector<int>(x, 0));
  for (int c = 0; c < (int)(x); c++) {
    int d = (c * 10) % x;
    int m = (x - d) % x;
    for (int r = 0; r < (int)(x); r++) {
      mat[r][c] = nums[m % x];
      m++;
    }
  }
  vector<vector<int> > init(nums.size(), vector<int>(1));
  for (int i = 0; i < (int)(nums.size()); i++) init[i][0] = nums[i];
  vector<vector<int> > An = pow(mat, b - 1);
  vector<vector<int> > res = mul(An, init);
  cout << res[k][0] << endl;
  return 0;
}
