We studied the interactions between the stellar wind plasma flow of a typical M star, such as GJ 436, and the hydrogen-rich upper atmosphere of an Earth-like planet and a ''super-Earth'' with a radius of 2 R Earth and a mass of 10 M Earth , located within the habitable zone at *0.24 AU. We investigated the formation of extended atomic hydrogen coronae under the influences of the stellar XUV flux (soft X-rays and EUV), stellar wind density and velocity, shape of a planetary obstacle (e.g., magnetosphere, ionopause), and the loss of planetary pickup ions on the evolution of hydrogen-dominated upper atmospheres. Stellar XUV fluxes that are 1, 10, 50, and 100 times higher compared to that of the present-day Sun were considered, and the formation of high-energy neutral hydrogen clouds around the planets due to the charge-exchange reaction under various stellar conditions was modeled. Charge-exchange between stellar wind protons with planetary hydrogen atoms, and photoionization, lead to the production of initially cold ions of planetary origin. We found that the ion production rates for the studied planets can vary over a wide range, from *1.0 · 10 25 s -1 to *5.3 · 10 30 s -1 , depending on the stellar wind conditions and the assumed XUV exposure of the upper atmosphere. Our findings indicate that most likely the majority of these planetary ions are picked up by the stellar wind and lost from the planet. Finally, we estimated the long-time nonthermal ion pickup escape for the studied planets and compared them with the thermal escape. According to our estimates, nonthermal escape of picked-up ionized hydrogen atoms over a planet's lifetime within the habitable zone of an M dwarf varies between *0.4 Earth ocean equivalent amounts of hydrogen (EO H ) to < 3 EO H and usually is several times smaller in comparison to the thermal atmospheric escape rates.