Hello, scorpio!

I'll reword the problem slightly ... for convenience.

An cube is painted, then it is cut into unit cubes.

A unit cube can have: 0, 1, 2, or 3 painted faces.

Making some sketches, the table can be extended and generalized.

. . . . . . . .

. .

Explanation

We have an cube.

There are always 8 corner-cubes (3 painted faces).

There are 12 edges; each edge has edge-cubes (2 painted faces).

There are 6 faces; each face has face-cubes (1 painted face).

Inside, there is a smaller cube of side unpainted cubes.