Of course the size of the habitat determines the number of species because of the species-area relationship, but the primary focus in alpha diversity is on the number of species that are adapted for a particular habitat. Gamma diversity is the number of species that live in a heterogeneous region. By region we mean a broad area that has similar climatic and topographical features but may have different habitats. Within the region organisms are adapted for the general conditions, but within different habitats they may have specialized for exploiting different resources. The actual species may be different in the habitats, so species turnover is important.
Beta diversity is the species turnover in a heterogeneous region.
It is very difficult to measure beta diversity, but it can be estimated by simply dividing gamma diversity by alpha diversity. When the same species are found in all habitats of a region then gamma diversity will equal alpha diversity and the beta diversity will be 1. Increasing the turnover increases the beta diversity because gamma diversity is increasing. Gamma diversity can never be less than alpha diversity. As we mentioned before, the abundances of species is important, too.