The "amount of lateral faces"? Do you mean the number of such faces rather than the area? Of course, you cannot find the area without knowing the size so I will assume you just mean the number. An "octagonal pyramid" has an octagon as base and edges rising from each vertex of the octagon to a single vertex above the base. It has exactly 8 lateral faces. It has 9 vertices and 16 edges.
Note that counting the base, the octagon has f= 9 faces, e= 16 edges, and v= 9 vertices. f- e+ v= 9- 16+ 9= 2, the "Euler characteristic" for all simple three dimensional solids.
I'll leave "rectangular prism" to you. Just find a rectangular box and count!