It is a bit more complicated than that but only a bit.
To work out how well a chosen pack will work with a particular rig you need to have an idea of what your amp draw will be at hover, for a basic quad that weighs around 1.5-1.6kg you would expect about a 18amp draw, it can go up to 50-60 amps when you give it the beans.
To work out what a battery can deliver you take the "C" rating and multiple it by the capacity of the pack so looking at your example of a 4S 40C 5000mH pack can deliver 40 x 5.0 = 200amps, plenty for what you want to do.
The bigger the battery capacity the more it will weigh and the more weight you carry the more power will be used to just get off the ground, it is always a trade off to put a bigger battery on board.
Pete