#include <bits/stdc++.h>   using namespace std;   const double pi = 2 * acos(0);   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int q;     cin >> q;     while (q--) {       int n, r;       cin >> n >> r;       set<int> s;       vector<int> v;       for (long long i = 0; i < n; i++) {         int a;         cin >> a;         s.insert(a);       }       for (auto u : s) v.push_back(u);       int cnt = 0;       for (int i = v.size() - 1; i >= 0; i--) {         if (v[i] - r * cnt > 0) cnt++;       }       cout << cnt <<   n ;     }     return 0;   }   