I'd like to know whether many or much should be used in the following:
a. A whale could weigh as much / many as two tons.
b. The company bought as much / many as two tons of cotton.
I'd appreciate your help.
The difference between as much and as many is basically the same as the difference between less or fewer.
If you are referring to something that you can count, for example a number of people or animals, you would use "as many".
There are not as many red squirrels as there used to be.
There are fewer squirrels than there used to be.
But if you are referring to a quantity of something which is not countable, for example, a quantity of water or other liquid, you would use "as much".
There is not as much water in the lake as there used to be.
There is less water in the lake than there used to be.
Just remember that if a quantity of something is grouped into containers, or by some other collective means that you can count - for example glasses of water then you use the appropriate language for the collective noun.
Finally though, when referring to measurements of something, as in your example of weight, you should use the appropriate language for the thing that you are measuring.
A whale could weigh as much as two tons.
This is correct because you can't "count" weight. You measure it. The same goes for your other example:
The company bought as much as two tons of cotton.
This is for the same reason that you can't "count" cotton and you can't "count" weight; but if the cotton came in boxes it would be different:
The company bought as many as two boxes of cotton.
Because you can count boxes.
Although you can count tons, kilos, pounds, ounces and so forth, with units of weight it is the total weight as a single quantity that governs the usage here. Use much, because that's what 99.9% of native speakers do.