#include <bits/stdc++.h>
using namespace std;
const int mod97 = 1000000000 + 7;
long long expo(long long p, long long q) {
  long long z = 1;
  while (q > 0) {
    if (q % 2 == 1) z = (z * p) % mod97;
    p = (p * p) % mod97;
    q >>= 1;
  }
  return z;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int mi = k + 1, mii;
    for (int i = 0; i < n; i++)
      if (arr[i] < mi) mi = arr[i], mii = i;
    if (mi > k)
      cout << 0 << "\n";
    else {
      int ans = 0, diff;
      for (int i = 0; i < n; i++) {
        if (arr[i] < k && i != mii) {
          diff = k - arr[i];
          ans += diff / mi;
          if (diff % k == 0) ans--;
        }
      }
      cout << ans << "\n";
    }
  }
  return 0;
}
