A fully powered beacon needs 164 blocks for the pyramid base. That means a 4-layer setup: 3x3, 5x5, 7x7, and 9x9.

If you count the beacon block itself and the 3 obsidian plus 5 glass used to craft it, the total materials are a bit higher, but for the powering structure the answer is 164 blocks.