#include <bits/stdc++.h>
using namespace std;


// n log(n)
// sqrt(n)
int totientFunc(int n) {
    int ans = 0;
    for (int i=1; i<=n; i++) {
        if (__gcd(n, i) == 1) ans++;
    }
    return ans;
}

const int N = 10000000;
vector<int> lp(N+1);
vector<int> pr;

// linear sieve 
void init() {
    for (int i=2; i <= N; ++i) {
        if (lp[i] == 0) {
            lp[i] = i;
            pr.push_back(i);
        }
        for (int j = 0; i * pr[j] <= N; ++j) {
            lp[i * pr[j]] = pr[j];
            if (pr[j] == lp[i]) {
                break;
            }
        }
    }

}

// Complexity = O(log(n))
int impTF(int n) {
    int phi = n;
    while(n > 1){
        int p = lp[n]; // p = lp[5] = 5
        phi -= phi / p; // phi = 40 - 40 / 5 = 32
        int power = 0;
        while (n % p == 0) n /= p, power++; // Can run at most log(n)
    }

    return phi;
}
// Find the TF for all numbers between 1 to n
// O (n * log(n))
// Optimized way = O(n * log (log (n)))

int divCount(int n) {
    int ans = 1;
    while(n > 1){
        int p = lp[n];
        int power = 0;
        while (n % p == 0) n /= p, power++; // Can run at most log(n)
        ans = ans * (power + 1);
    }
    return ans;
}

void phi_1_to_n(int n) {
    vector<int> phi(n + 1);
    for (int i = 0; i <= n; i++)
        phi[i] = i;

    for (int i = 2; i <= n; i++) {
        if (phi[i] == i) { // i = 2, phi[2] = 2
            for (int j = i; j <= n; j += i) // j = 2; j<=n; j+=2
                phi[j] -= phi[j] / i;
        }
    }
}

int main( ) {
    init();
    cout << totientFunc(120000) << endl;
    cout << impTF(120000) << endl;

}

/*
    Find all prime factors of 120 = 2 ^ 3 * 3 * 5
    Result = [2] + [3, 5] = [2, 3, 5]
    lp[120] = 2
    120 / 2 = 60
    60 / 2 = 30
    30 / 2 = 15
    lp[15] = 3
    15 / 3 = 5
    lp[5] = 5
*/


#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;

    for (int i=0; i<n; i++) {
        int x;
        cin >> x;
        int ans = 0;
        for (int j=1; j*j <= x; j++) {
            if (x % j == 0) {
                ans++; 
                if (j != (x / j)) ans++;
            }
        }
        cout << ans << endl;
    }
}