#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int q;
  cin >> q;
  vector<int> ans(q, 0);
  for (int i = 0; i < (int)q; i++) {
    ll n, r;
    cin >> n >> r;
    ll x[n];
    set<ll, greater<ll>> s;
    for (int j = 0; j < (int)n; j++) {
      cin >> x[j];
      s.insert(x[j]);
    }
    for (auto k : s) {
      if (k - ans[i] * r <= 0) break;
      ans[i]++;
    }
  }
  for (auto t : ans) cout << t << endl;
  return 0;
}
