The number of addresses in a network is determined by the number of host bits in its subnet mask, calculated as 2 raised to the power of the number of host bits.