I'm not really sure about the number, you can ask the salesperson for advice, but I think it is 2 shrimp per gallon of water. You didn't specify whether you have plants and/or hiding spots in your tank... if you don't then the fry will be eaten by the parents and I'm not sure that the shrimp will be feeling very safe, if you do have plants, than even shrimp won't be able to eat all the fry as at least one will manage to survive in bunches of plants.
Also maybe I should mension that my molly is only at about 2" and since they can get as big as 3-4" I'm not sure whether they will or not eat the shrimp once they attain their maximum size... In any case plants and their natural camouphlage should protect them even from larger fish. In any case ghost shrimp are cheap, so you can try them for yourself and see how they do, worst case - your fish are going to have a nutritious addition to their menu. Hope I helped.