Measurements of the Z partial decay width into $c\bar c$ and multiplicity of charm quarks per b decay