Using the Euler's formula, we have:
F + V - E = 2 (F=faces, V=vertices, E=edges)
5 + V - 8 = 2 (Replacing the values)(Since it is a quadrilateral pyramid it has 8 edges)
-3 + V = 2 (Subtracting)
V = 3 + 2 (Adding 3 to both sides of the equation)
V= 5 (Adding)
The answer is 5.