I am planning to visit four Schengen countries, and am planning to apply for a visa through Germany.
Is there any minimum number of days I should be staying in the country through which I apply?
The rules are that you should apply to the country where:
If you are spending an equal amount of time in all countries, then you should apply to the first country that you will enter the Schengen zone in.
From my personal experience - some airlines do not allow you to board except to the destination of your Schengen visa country especially if this is the first time you are traveling on that visa.
There is no "minimum" amount of time, but the maximum that you can spend in the entire Schengen zone depends on the kind of visa you receive.