# [JavaScript (Node.js)],<s> 57 </s>54 bytes

<!-- language-all: lang-javascript -->

    f=(n,i=1,s=0)=>n%1?0:n<++i*i?s+!s:f(n,i,s+f(n/i)*f(i))

[Try it online!][TIO-m306rcse]

[JavaScript (Node.js)]: https://nodejs.org
[TIO-m306rcse]: https://tio.run/##FcsxDoMwDEDRvadIB6QYp5CsgMtZECWVK2QjXPX6aZj@8v5n@S22nnx8H6KvrZRMXgJTCkYR6ClNmuMgEyK3PBvebcgXCIa1PUObPQOUrKfzQml0MqUYR4cocFtVTPet2/VdJ1ePSv8 "JavaScript (Node.js) – Try It Online"

If there's no way to factor, then it's a prime and return 1