Normally its converting the power of the engine into thrust for the craft. Smaller helicopters dont have a use for 4 or 6 blades where as large lifting helicopters wouldnt be able to transfer the power from their engines efficiently with only 2 blades.
Truthfully there is no magic number and is has to do a whole lot with engineering for power, sound, feeling, vibration, etc. Something like a UH-1 isnt going to have the same mission as a sea stallion, thus different blade designs, length, profiles, etc.
As for adding more blades to a helicopter, i am unsure if you would gain anything as another blade would in theory be another lifting surface, but weight and drag to overcome as well. The same holds true for planes. A 2 blade prop vs 3 have very little difference in most applications other than noise in the cabin.
Latest Answers