Polynomial size Boolean circuit for counting number of bits
You can write a straight-line program (an equivalent way to define a circuit) that computes the Boolean variables $z_{i,j}=[x_1+y_1+\cdots+x_i+y_i \equiv j \pmod{3}]$ (where $i=1,\ldots,n$ and $j=0,1,2$) as follows:


$z_{1,0} = \lnot x_1 \land \lnot y_1$.
$z_{1,1} = (x_1 \land \lnot y_1) \lor (\lnot x_1 \land y_1)$.
$z_{1,2} = x_1 \land y_1$.
$z_{i+1,j} = (z_{i,j} \land \lnot x_{i+1} \land  \lnot y_{i+1}) \lor (z_{i,j-1} \land ((x_{i+1} \land \lnot y_{i+1}) \lor (\lnot x_{i+1} \land y_{i+1})) \lor (z_{i,j-2} \land x_{i+1} \land y_{i+1})$


The output of the circuit is $o = \lnot z_{n,n \bmod 3}$.

The circuit has size $O(n)$.