© 2014 ESO. We present constraints on cosmological parameters using number counts as a function of redshift for a sub-sample of 189 galaxy clusters from the Planck SZ (PSZ) catalogue. The PSZ is selected through the signature of the Sunyaev-Zeldovich (SZ) effect, and the sub-sample used here has a signal-to-noise threshold of seven, with each object confirmed as a cluster and all but one with a redshift estimate. We discuss the completeness of the sample and our construction of a likelihood analysis. Using a relation between mass M and SZ signal Y calibrated to X-ray measurements, we derive constraints on the power spectrum amplitude σ8 and matter density parameter Ωm in a flat ΛCDM model. We test the robustness of our estimates and find that possible biases in the Y-M relation and the halo mass function are larger than the statistical uncertainties from the cluster sample. Assuming the X-ray determined mass to be biased low relative to the true mass by between zero and 30%, motivated by comparison of the observed mass scaling relations to those from a set of numerical simulations, we find that σ8 = 0.75 ± 0.03, Ωm = 0.29 ± 0.02, and σ8(Ωm/0.27)0.3 = 0.764 ± 0.025. The value of σ8 is degenerate with the mass bias; if the latter is fixed to a value of 20% (the central value from numerical simulations) we find σ8(Ωm/0.27)0.3 = 0.78 ± 0.01 and a tighter one-dimensional range σ8 = 0.77 ± 0.02. We find that the larger values of σ8 and Ωm preferred by Planck's measurements of the primary CMB anisotropies can be accommodated by a mass bias of about 40%. Alternatively, consistency with the primary CMB constraints can be achieved by inclusion of processes that suppress power on small scales relative to the ΛCDM model, such as a component of massive neutrinos. We place our results in the context of other determinations of cosmologicalparameters, and discuss issues that need to be resolved in order to make further progress in this field.