We know that the ratio between the number of orange cubes and the number of all cubes it 3:5.
So, we can use a proportion like
[tex] \text{unit ratio of orange cubes} : \text{unit ratio of all cubes} = \text{actual number of orange cubes} : \text{actual number of all cubes} [/tex]
Which means, if we let c be the number of cubes,
[tex] 3:5 = 12:c \iff c = \dfrac{5\cdot 12}{3} = 20 [/tex]