Function for counting composite numbers

Let $x = 2^n$ for convenience.

There are $x/4$ ways to write $x$ as a sum of two odd numbers. Of these, $\pi(x/2)$ have a prime (or $1$) in the first (lesser) component, and $\pi(x) - \pi(x/2)$ have a prime in the second (greater) component. Therefore the number of pairs of odd composite numbers summing to $x$ is bounded below by $$x/4 - \pi(x) \sim x/4$$ and bounded above by $$x/4 - \pi(x/2) \sim x/4,$$ so it is clearly asymptotic to $x/4$ with an error term of size $\Theta(x/\log x)$. The relative error in this approximation is $\Theta(1/\log x)$, exactly the same order of accuracy as $\pi(x) \approx x/\log x$ which has an error of size $\Theta(x/\log^2 x)$.

Addendum: for an even better approximation, one can prove via sieve methods that the number of prime pairs summing to $x$ is bounded above by $O(x/\log^2 x)$ (note the constant here depends on the prime divisors of $x$, so we are making critical use of the fact that $x = 2^n$). Therefore, the intersection of the two sets of sums in the above paragraph is asymptotically small, and so $x/4 - x/\log x$ is an approximation that is accurate to within a relative error of $O(1/\log^2 x)$. Probably no further asymptotic terms can be extracted, except heuristically: the dependence on Goldbach's conjecture is pretty clear.