The small cubes that have exactly one face painted red are those 2x2 = 4 cubes at each large face that are located at the center of each face and are not attached neither to the edges nor to the corners. The total number of such small cubes is 4*6 = 24. Here "6" is the number of faces of the large cube.