Look at the cake one layer at a time. Each layer has 9 pieces: 4 corner pieces, 4 edge-middle pieces and 1 centre piece.
Top layer (icing on the top, and on the sides):
- 4 corner pieces: top + 2 sides = 3 iced faces
- 4 edge-middle pieces: top + 1 side = 2 iced faces
- 1 centre piece: top only = 1 iced face
Middle layer and bottom layer (no top icing; the bottom is not iced):
- 4 corner pieces in each: 2 sides = 2 iced faces
- 4 edge-middle pieces in each: 1 side = 1 iced face
- 1 centre piece in each: no iced face
(i) Exactly 3 faces: only the 4 top corners. 4 pieces.
(ii) Exactly 2 faces: 4 top edge-middles + 4 middle-layer corners + 4 bottom-layer corners:
4+4+4=12
12 pieces.
(iii) No face: the centre of the middle layer and the centre of the bottom layer. 2 pieces.
Check: pieces with exactly 1 iced face are 1+4+4=9, and 4+12+9+2=27, all the pieces.