In how many ways can the faces of a rectangular box can be painted so that the color changes occur only at each corner? 
With three differently colored paints, in how many ways can the faces of a rectangular box can be painted so that the color changes occur only at each corner?  

I was trying to solve this by principle of inclusion and exclusion, but I am unable to enumerate the number of ways to color the rectangular box( without any restrictions) because there are some distinct faces(adjacent faces) and some are non distinct faces(opposite faces).
Please help
Edit: The colorings which differ by rotation/s are considered to be same.
 A: Thought about it a bit more. There is precisely one way.
The formulation of the problem I am considering is that we have a rectangular box, three colors, say magenta, cyan, yellow, and we must color the sides of the box so that at every edge, the color of the walls adjacent to the edge is different.
In order to do this, we must have opposing sides be the same color. For suppose there are two opposing sides of different colors, say magenta and cyan. To be concrete, orient the box so that these sides are the "ceiling" and the "floor". Then consider the other four sides. Each of these is adjacent to a magenta side (the "ceiling") and a cyan side (the "floor"), so to avoid being the same color they must all be yellow. But then the sides are the same color as the other adjacent sides. So we must have opposing sides be the same color.
Now, from here, it is easy to see that any two cubes whose sides are colored like this can be rotated into the other. (Reflections don't come into account, since a cube colored like this is reflection-symmetric.) So pick any opposing pair of sides to be magenta, any other pair to be cyan, the last pair to be yellow; every choice is the same choice, so there is exactly one way to do this.
A: I assume you have a cube instead of an arbitrary box. You can use Burnside's lemma / Pólya's enumeration theorem. It's very nicely described here. Basically you find the different kind of rotations of the cube and count for each rotation how many colourings it fixes. Then Burnside's lemma states that the sum of these numbers divided by the number of rotations is the answer you seek.
