My student wanted to know. The classic way is to do the prime factorization for the number, take the exponent of each prime factor and add 1 to it and multiply these together, and the result is the number of factors that the original number has.

The 17b can do it easily in a solver equation:

nf=0xL(a:(n))+2+(i:2:g(a):1:if(mod(n:i)=0:if(i=a:1:2):0))

It works on the 17b, 17bii, and 17bii+, although it's much slower on the plus.

*Edited: 2 July 2011, 9:45 p.m. *