#include <bits/stdc++.h>
using namespace std;
int main(){
int t; cin >> t;
for(int i = 1; i <= t; i++){
int n, k; cin >> n >> k;
int a[n];
for(int &x : a) cin >> x;
sort(a, a + n);
int cnt = 1;
for(int i = 1 ; i < n; i++){
if(a[i] - a[i-1] <= k ){
continue;
}
else{
++cnt;
}
}
cout <<"Case #" << i << ": ";
cout << cnt << endl;
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICAgIGludCB0OyBjaW4gPj4gdDsKICAgIGZvcihpbnQgaSA9IDE7IGkgPD0gdDsgaSsrKXsKICAgICAgICBpbnQgbiwgazsgY2luID4+IG4gPj4gazsKICAgICAgICBpbnQgYVtuXTsKICAgICAgICBmb3IoaW50ICZ4IDogYSkgY2luID4+IHg7CiAgICAgICAgc29ydChhLCBhICsgbik7CiAgICAgICAgaW50IGNudCA9IDE7CiAgICAgICAgZm9yKGludCBpID0gMSA7IGkgPCBuOyBpKyspewogICAgICAgICAgICBpZihhW2ldIC0gYVtpLTFdIDw9IGsgKXsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2V7CiAgICAgICAgICAgICAgICArK2NudDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjb3V0IDw8IkNhc2UgIyIgPDwgaSA8PCAiOiAiOwogICAgICAgIGNvdXQgPDwgY250IDw8IGVuZGw7CiAgICB9Cn0KICAgIA==