The first one has 24 squares as mentioned by @Chronos. Here is how I figured that out (I didn’t count them). Represent a line segment as 2+e, two vertices and on edge. Then a square is gotten by multiplying two of them, giving (2+e)^2=4+4e+4e^2, understood as consisting of 4 points, 4 edges and one square. Similarly, a cube is represented by
(2+e)^3=8+12e+6e^2+e^3
a tesseract by
(2+e)^4=16+32e+24e^2+8e^3+e^4
and a 5-cube by
(2+e)^5=32 + 80e +80e^2+40e^3+10e^4+e^5
which gives the 80 squares as described by @Chronos. But it also tells you that it counts 40 cubes and 10 tesseracts.
Incidentally, in all cases, the alternating sum of the coefficients is exactly 1. This is essentially equivalent to Euler’s formula v-e+f=2 in two dimensions.