I think something is wrong with the question you have given

it should be

6x10x8 and NOT 6x1x8(can youcuta cube of 2cm side from a prism of any of its dimension 1cm)

-------------------------------------

The best way here is check the volume

Volume of prism = Total volume of all the prisms

6x 10 x 8 = 480cm^3

Volume of a single prism = 2x2x2 = 8cm^3

Lets say we got n prisms , so

8n = 480

n = 60 cubes

Thus we got 60 cubes