30 revolutions.

If we break each wheel into its prime factors, we get:

63 = 3 x 3 x 7

42 = 2 x 3 x 7

35 = 5 x 7

27 = 3 x 3 x 3

We now think of rotating the large wheel just once, and this is 3 x 3 x 7 teeth moved (3 x 21), and we can see that 42 tooth wheel also has a 3 x 7 (21 teeth) in it, with an extra 2. If we therefore rotate the 63 toothed wheel twice, the 42 will have rotated three times.

The answer involves cancelling any common factors from the large wheel. We can cancel 3, 3, 7 from any of the smaller ones to leave 2 (from the 42), 5 (from the 35) and 3 (from the 27). 2 x 5 x 3 = 30. QED.