First is to get the volume of the cylinder.
Volume = pi r^2 H
Volume = 3.1416 (5/2)^2 30
Volume = 589.05 in^3
30% is already filled.
Filled Space = 589.05 0.30
Filled Space = 176.715 in^3
Empty Space = 412.335 in^3
Next, get the volume of the sphere.
V = (4/3)pir^3
V = (4/3)pi*(0.6/2)^3
V = 0.1130976 in^3
Number of foams = Filled Space / V
Number of foams = 176.715 / 0.1130976
Number of foams = 1562 Foams