#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> A(n);
    for (long long i = 0; i < n; i++) {
      cin >> A[i];
    }
    sort(A.begin(), A.end());
    long long ans = 0;
    for (long long i = n - 1; i > 0; i--) {
      long long l = 0, r = k + 1;
      while (l < r - 1) {
        long long m = (l + r) / 2;
        if (A[i] + A[0] * m <= k) {
          l = m;
        } else {
          r = m;
        }
      }
      ans += l;
    }
    cout << ans << "\n";
  }
  return 0;
}
