#include <bits/stdc++.h>
using namespace std;
struct comp {
  bool operator()(const int &a, const int &b) const { return a > b; }
};
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, r;
    cin >> n >> r;
    int x[n];
    for (int i = 0; i < n; ++i) cin >> x[i];
    set<int, comp> s;
    for (int i = 0; i < n; ++i) {
      int temp = x[i];
      s.insert(temp);
    }
    int cnt = 0, ans = 0;
    while (!s.empty()) {
      int temp = *s.begin();
      s.erase(temp);
      if (temp - cnt * r > 0)
        ++ans, ++cnt;
      else
        break;
    }
    cout << ans << "\n";
  }
}
