There were 42 apples in each crate. 12 such crates of apples were delivered to a factory. 4 apples were rotten and had to be thrown away. The remaining apples were packed into boxes of 10 apples each. How many boxes of apples were there? Can u explain how?