#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    sort(a.begin(), a.end());
    int i = 0;
    long long dem = 0;
    for (int j = n - 1; j >= 1; --j) {
      if (a[i] + a[j] <= k) {
        dem += (k - a[j]) / a[i];
      }
    }
    cout << dem << "\n";
  }
}
