Explanation:
we divide 2/3 by 1/8 (to see how often 1/8 fits into 2/3).
remember, when dividing one fraction by another, it is the same as multiplying with the upside-down second fraction.
2/3 / 1/8 = 2/3 × 8/1 = (2×8)/(3×1) = 16/3 = 5 1/3
that means that there are 5 containers with 1/8 gallon of paint, and a 6th container with a little bit of paint left (a third of 1/8 gallons = 1/8 / 3/1 = 1/8 × 1/3 = 1/24), 1/24 of a gallon.
so, 6 containers in total have paint in them.