Not Germany but Poland grants most residence permits.
Due to Eurostat Poland is the first country giving residence permit to foreigners outside European Union. Eurostat, the official statistical agenda of European Union, issued at 17th July 2019 very interesting report of residence permit granted by each EU States:
Poland granted 683,228 of residence permit which is 21,7% of total TRP in all EU states. It is rather surprising that Germany did not achieve first place. It is also interesting as information presented by west European mainstream media describes Poland as not supporting immigration EU state.
The report considered residence permit in 2017 but everything seems to achieve similar numbers in 2018 and maintain in 2019.
It has to be outlined that residence permit in Poland entitles foreigner to freely travel to each Schengen state. Still, obtaining Polish residence permit is formalized procedure which involves certain requirements to be met.