#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const long long MOD = 1e9 + 7;
using namespace std;
const int VAL = 10000000;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int ara[n];
    for (int i = 0; i < n; i++) cin >> ara[i];
    sort(ara, ara + n);
    int s = ara[0];
    int c = 0;
    for (int i = 1; i < n; i++)
      while (ara[i] + s <= k) ara[i] += s, c++;
    cout << c << '\n';
  }
  return 0;
}
