#include <bits/stdc++.h>
using namespace std;
const long long int N = 500010;
vector<vector<long long int> > ch, ar;
void multiply(vector<vector<long long int> > &a,
              vector<vector<long long int> > &b) {
  vector<vector<long long int> > c;
  c.resize(a.size(), vector<long long int>(b[0].size(), 0));
  for (long long int i = 0; i < a.size(); ++i) {
    for (long long int j = 0; j < b[0].size(); ++j) {
      c[i][j] = 0;
      for (long long int k = 0; k < a[0].size(); ++k) {
        c[i][j] = (c[i][j] + (a[i][k] * b[k][j]) % 1000000007) % 1000000007;
      }
    }
  }
  a = c;
}
void power_matrix(long long int n) {
  if (n == 1) {
    ar = ch;
    return;
  }
  power_matrix(n / 2);
  multiply(ar, ar);
  if (n % 2 == 1) {
    multiply(ar, ch);
  }
}
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 bh[10] = {0};
  for (long long int i = 0; i < n; ++i) {
    long long int a;
    cin >> a;
    bh[a] += 1;
  }
  ch.resize(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) {
      ch[i][(10 * i + j) % x] += bh[j];
    }
  }
  power_matrix(b);
  cout << ar[0][k] << endl;
  return (0);
}
