Proving Barker's formula is shown below. One immediate comment is that a composite counting function falls out directly from the prime counting function.
Using the approximation #primes ~ $1.022*N/log(N)$ and that integers>1 are either prime or composite yields:
number of composites ~ $N -1.022*N/log(N)$
and since half of a number range are even composites,
number of odd composites ~ $N/2-1.022*N/log(N)$ (1)
To formulate it with Barker's x&y seems unduly complicated but of course we know
max($2x-1+4y(x+y))$ ~ N for the maximum x&y considered. (2)
which allows (1) to be expressed in terms of x&y if that is what you seek.
For example, let max x,y both=100, then (max) N ~ 80199. Substituting (2) into (1) yields
number of odd composites ~ $80199 /2 - 80199*1.022/log(80199) = 32841$. Since even composites ~ 40099, all composites~ 72940.
Checking, 72940 + #primes ~ $72940 + 1.022*80199/log(80199) = 80198$, which checks. Of course, actual $primepi(80199)=7852$ vs the 7258 approximation.
(proof of Barker's)
Barker's formula is equivalent to factors:
$( 2y+1 , 2(x+y)-1 )$ (3)
(3) directly shows (1) produces no prime numbers (each term having a
minimum value of 3, for a minimum product of 9, the lowest odd composite),
and only produces odd number solutions. Thus it produces only odd composites.
We start with an odd composite number. Here, k>3, p>1, q>1, x>0, y>0 all are integers.
This number must be of the form 2k+1 since it is odd, expressible as
$2k+1 =(2p-1)*(2q-1)$.
There are three scenarios: $p<q, p=q, p>q$
$p<q: p=y+1, q=y+x$ which gives us $2k+1=(2[y+1]-1)(2[y+x]-1)= (2y+1)(2y+2x-1)$
$p=q: p=y+1, q=y+1 2k+1 = (2[y+1]-1)(2[y+1]-1)= (2y+1)(2y+2-1)$ In this case x=1
p>q : Same as first row but flipped values for p and q.
So any and all odd composites can be expressed in form $2x +4y(x+y)-1$.