This stack is built from 34 cubes standing on 16 squares. A hidden cube is one that is completely boxed in, so you could not see it from any side. Work along the stack and find them.
3 cubes in this stack are walled in on all four sides with a cube on top, so they are hidden.
Cube stack viewed from the default viewpoint. Cubes are at (0, 0, 0); (1, 0, 0); (2, 0, 0); (3, 0, 0); (3, 1, 0); (3, 2, 0); (0, 0, 1); (0, 1, 1); (1, 0, 1); (1, 1, 1); (1, 2, 1); (2, 0, 1); (2, 1, 1); (2, 2, 1); (3, 0, 1); (3, 1, 1); (0, 0, 2); (1, 0, 2); (1, 1, 2); (1, 2, 2); (2, 0, 2); (3, 0, 2); (3, 1, 2); (0, 0, 3); (0, 1, 3); (1, 0, 3); (1, 1, 3); (1, 2, 3); (2, 0, 3); (2, 1, 3); (2, 2, 3); (3, 0, 3); (3, 1, 3); (3, 2, 3). The count options are option 1 count 6. option 2 count 3. option 3 count 4. option 4 count 5.
How you get there
The stack holds 34 cubes. Check only columns away from the edges, then test each level for a roof and four walls. The boxed-in positions are column 2 from the left and 2 from the back, level 1; column 3 from the left and 2 from the back, level 1; column 2 from the left and 3 from the back, level 1. At each listed position there is a cube above and one to the left, right, front and back, while the table covers the base. That gives 3 cubes, so the answer is 3.