[MATLAB/Octave], 35 34 3426 bytes
A=factorialf=@(1:n) Annz(A<=n)cumprod(end1:n)<=n) The second echo will returnThanks @David for the result. Might crash your systemfeedback! I added the f= to have way to call the function for large values of n2 bytes.