Let $d$ be a function taking the positive integers to the nonnegative integers such that $d(p) = 1$ for any prime $p,$ and
d(ab) = b \cdot d(a) + a \cdot d(b)
for all positive integers $a$ and $b.$ Find the number of positive integers $n \le 10$ such that $d(n) = 1.$