#include <bits/stdc++.h>
using namespace std;
long long tab[128] = {0};
long long ans[128] = {0};
int n, b, k, x, a;
void multiply(long long* tab1, long long* tab2, int p) {
  long long tab3[128];
  for (int i = 0; i < x; ++i) tab3[i] = 0;
  for (int i = 0; i < x; ++i) {
    for (int j = 0; j < x; ++j) {
      int l = (i + j * p) % x;
      tab3[l] = (tab3[l] + ((tab1[i] * tab2[j]) % 1000000007)) % 1000000007;
    }
  }
  for (int i = 0; i < x; ++i) tab2[i] = tab3[i];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    tab[a % x]++;
  }
  bool first = true;
  int p = 1;
  int f = 10 % x;
  while (b > 0) {
    if (b % 2 == 1) {
      if (first) {
        for (int i = 0; i < x; ++i) ans[i] = tab[i];
        first = false;
      } else {
        multiply(tab, ans, f);
      }
    }
    multiply(tab, tab, f);
    p = f;
    f = (f * f) % x;
    b >>= 1;
  }
  cout << ans[k] << endl;
  return 0;
}
