While quantizing a non-Abelian gauge theory covariantly, we first demand that the BRST charge acting on the physical states of the Hilbert space must be zero. However such physical states still have an unequal number of ghost and antighost particles and as the book is claiming, longitudinal bosons. To get rid of them he then applies the ghost number operator and picks out those states from the physical Hilbert space which are invariant under it.
So here's my question. I've often come across the statement that BRST symmetry is somehow related to gauge invariance. Is this true? If it is, why do you impose the further requirement that the gauge bosons must only be transversely polarized? I mean shouldn't the BRST invariance (which implies gauge invariance which again implies transverse polarizations) be enough to guarantee that?