We report on a thorough optical investigation over a broad spectral range and as a function of temperature of the charge dynamics in Ba(Co$_x$Fe$_{1-x}$)$_2$As$_2$ compounds for Co-doping ranging between 0 and 18%. For the parent compound as well as for $x$=0.025 we observe the opening of a pseudogap, due to the spin-density-wave phase transition and inducing a reshuffling of spectral weight from low to high frequencies. For compounds with 0.051$le x le$ 0.11 we detect the superconducting gap, while at $x$=0.18 the material stays metallic at all temperatures. We describe the effective metallic contribution to the optical conductivity with two Drude terms, representing the combination of a coherent and incoherent component, and extract the respective scattering rates. We establish that the $dc$ transport properties in the normal phase are dominated by the coherent Drude term for 0$le x le$0.051 and by the incoherent one for 0.061$le x le$0.18, respectively. Finally through spectral weight arguments, we give clear-cut evidence for moderate electronic correlations for 0$le x le$0.061, which then crossover to values appropriate for a regime of weak interacting and nearly-free electron metals for $xge$0.11.