Count the divisors of n with particular property Take $n = \prod_{i=1}^r {p_i}^{\alpha_i}$, where each $p_i$ is a prime and $\alpha_i\geq 1$.

How many divisors of $n$, not equal to $n$, contain at least one $p_i$ with the corresponding multiplicity $\alpha_i$?
I'm not sure if your posted answer is correct, but here's one way to think about the problem. How many divisors are there where no prime occurs with maximal multiplicity? This is easy to compute as $\prod_m \alpha_m$ since you can choose exponents between $0$ and $\alpha_m-1$ for each prime divisor, each giving rise to a unique product for each choice. Then how many total divisors are there? This is $\prod_m (\alpha_m + 1)$. The difference between these two quantities is the answer you want, and subtract $1$ if you want to exclude $n$ as a divisor of itself.
If $ \ n=(p_1)^{a_1} \ \times \ldots \times (p_r)^{a_r} \ $
then the required answer is

$$ (a_1+1)(a_2+1)\ldots(a_{(r-1)}+1) \ + \ (a_1+1)(a_2+1)\ldots (a_{(r-2)}+1)(a_r+1) \ + \ \ldots \ +(a_1+1)(a_3+1)\ldots (a_{(r-2)}+1)(a_{(r-1)}+1)(a_r+1) \ + \ (a_2+1)(a_3+1)\ldots(a_{(r-2)}+1)(a_{(r-1)}+1)(a_r+1) \ - \ r \ ; $$ 

the sum contains $ \ r \ $ summands.

Example for $n=24=2^3\cdot3$, the numbers are $2^3 \ , \ 2\cdot3 \ , \ 2^2\cdot3 \ , \ 3$ . According to the formula the number of such numbers is $ \ (3+1)+(1+1)-2 \ =  \ 4 \ $ .