For each positive integer $n > 1$, let $P(n)$ denote the greatest prime factor of $n$. Find the number of positive integers $n$ for which both $P(n) = \sqrt{n}$ and $P(n+48) = \sqrt{n+48}$ hold true.

Let's think step by step and output the final answer within \boxed{}.
user