A square pyramid has 1 square base and 4 triangle-shaped sides.
The base is the bottom, so a square-based pyramid has ONE base.
A square based pyramid has 8 edges, 6 vertices and 5 faces.
they both have square bases
5. one for the square bottom, and one for each side coming out from the square
While it is possible for a pyramid to have a square bases, you should not assume that all pyramids have square bases. Try to picture a triangular pyramid in your head, hopefully you can see that it is possible, and this would answer your question.
5 faces one on the bottom and 4 for the sides
A square pyramid has five faces, one of which is a square and the remaining four are triangles. Conventionally such a pyramid is called a square BASED pyramid and in that context it has only one base. [That definition is used to distinguish it from a pentagonal pyramid, a hexagonal pyramid, etc.] However, any one of the five faces can be at the bottom.
It is a pyramid that has a triangle as its base. The pyramids of Egypt are all built on square bases.