#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  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];
    sort(arr, arr + n);
    int kp = arr[0];
    int ans = 0;
    for (int i = 1; i < n;) {
      if (arr[i] + kp <= k) {
        ans++;
        arr[i] += kp;
      } else {
        i++;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
