Pseudorapidity (eta) distributions of charged particles produced in proton-proton collisions at a centre-of-mass energy of 8 TeV are measured in the ranges vertical bar eta vertical bar < 2.2 and 5.3 < vertical bar eta vertical bar < 6.4 covered by the CMS and TOTEM detectors, respectively. The data correspond to an integrated luminosity of L = 45 mu b(-1). Measurements are presented for three event categories. The most inclusive category is sensitive to 91-96 % of the total inelastic proton-proton cross section. The other two categories are disjoint subsets of the inclusive sample that are either enhanced or depleted in single diffractive dissociation events. The data are compared to models used to describe high-energy hadronic interactions. None of the models considered provide a consistent description of the measured distributions.