I was reading on counting the number of twin primes and I found this heuristic explanation on the Hardy-Littlewood conjecture, which states that $$\pi_2(x)\sim 2\Pi_2 \frac{x}{\log^2(x)},$$ where $\pi_2$ denotes the number of twin primes smaller than $x\in[0,\infty)$ and $$\Pi_2=\prod_{p\geq 3}\left(1-\frac{1}{p}\right)^{-2}\frac{p-2}{p}.$$ The explanation given goes as follows:
The prime number theorem states that $\pi(x)\sim\frac{x}{\log(x)}$ where $\pi(x)$ denotes the number of primes smaller than $x\in[0,\infty)$. Then, we say that the probability that an integer $a\in[1,n]$ is $\frac{1}{\log(n)}$. Assuming that $a$ and $a+2$ being prime are independent events, the probability of both of them being prime is $\frac{1}{\log^2(n)}$. However, this is obviously not true since (for example) if $a$ is prime, $a+2$ is more likely to be prime, since it is not divisible by $2$. We refine this model as follows: given a "small" integer $w>0$ we say that the probabily of an integer $a\in[1,n]$ being prime is $0$ if some prime $p\leq w$ divides $a$ and $$\prod_{p\leq w} \left(1-\frac{1}{p}\right)^{-1}\frac{1}{\log(n)}$$ otherwise. Then, we count the number of twin primes smaller than $n$ using this model to get $$2\prod_{p\leq w,\ p\neq 2}\left(1-\frac{1}{p}\right)^{-2}\frac{p-2}{p}\frac{n}{\log^2(n)}.$$ Letting $w\to\infty$ we get the result in the conjecture.
What I don't understand is the final counting part. According to my source, the $2$ appears because if $a$ is prime, $a+2$ is odd, and the factor $\frac{p-2}{p}$ appears because out of $p$ numbers, only $p-2$ can be the biggest of a twin prime because the ones congruent to $0$ or $2$ modulus $p$ cannot be. I understant this facts but I don't know how to apply them to calculate the estimated number of twin primes smaller than $n$. Any insight would be appreciated.