TheW andQ 2 dependence of the fragmentation functions and of the average multiplicity of charged pions is investigated, using data from the NA9 experiment at the CERN SPS on muon-proton scattering at 280 GeV. A significant increase of pion production with increasingW is observed at fixedQ 2, leading to a rise of the average charged pion multiplicity, linear in lnW 2, and of the pion fragmentation function in the central region, i.e. at small |x F |. This increase can be understood from the kinematic widening of the cms rapidity range proportional to lnW 2 and the observedW independent height of the rapidity distribution. At fixedW, a rise of the average charged pion multiplicity withQ 2 is observed. This rise appears to be weaker than that observed for all charged hadrons implying a stronger rise withQ 2 for kaons and protons.