A viewer who has never seen this puzzle can sort any painted cube into corners, edges, face centres and the hidden core, and count each
"The corners are the ones with 2 painted sides" (they have 3)
If each edge has n small cubes, 2 painted sides means 12 times n minus 2.