#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int T, n, k, s[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin >> T;
  while (T--) {
    cin >> n >> k;
    int cnt = 0;
    for (int i = 1; i <= n; i++) cin >> s[i];
    sort(s + 1, s + 1 + n);
    for (int i = 2; i <= n; i++) {
      if (k - s[i] >= s[1]) {
        cnt += (k - s[i]) / s[1];
        s[i] += ((k - s[i]) / s[1]) * s[1];
      }
    }
    sort(s + 2, s + 1 + n);
    for (int i = 2; i <= n; i++) {
      if (s[1] >= k) break;
      s[1] += s[i];
      if (s[1] <= k) cnt++;
    }
    cout << cnt << endl;
  }
  return 0;
}
