#include <bits/stdc++.h>
using namespace std;
const long long int N = 200010;
vector<vector<long long int> > multiply(vector<vector<long long int> > a,
                                        vector<vector<long long int> > b) {
  long long int n = a.size();
  long long int m = b[0].size();
  long long int o = a[0].size();
  if (o != b.size()) {
    exit(1);
  }
  vector<vector<long long int> > c(n, vector<long long int>(m, 0));
  for (long long int i = 0; i < n; ++i) {
    for (long long int j = 0; j < m; ++j) {
      c[i][j] = 0;
      for (long long int k = 0; k < o; ++k) {
        c[i][j] = (c[i][j] + (a[i][k] * b[k][j]) % 1000000007) % 1000000007;
      }
    }
  }
  return c;
}
vector<vector<long long int> > power(vector<vector<long long int> > ar,
                                     long long int n) {
  if (n == 1) {
    return ar;
  }
  if (n % 2 == 0) {
    return power(multiply(ar, ar), n / 2);
  } else {
    return multiply(ar, power(ar, n - 1));
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, b, k, x;
  cin >> n >> b >> k >> x;
  long long int ch[10] = {0};
  for (long long int i = 0; i < n; ++i) {
    long long int a;
    cin >> a;
    ch[a] += 1;
  }
  vector<vector<long long int> > ar(x, vector<long long int>(x, 0));
  for (long long int i = 0; i < x; ++i) {
    for (long long int j = 0; j < 10; ++j) {
      ar[i][(10 * i + j) % x] += ch[j];
    }
  }
  ar = power(ar, b);
  cout << ar[0][k] << endl;
  return (0);
}
