Hemoglobin question- how many alleles?
Meaning of Allele

The word "allele" is often used with two slightly different meanings in biology.

The first, probably more appropriate usage is the one in Remi.b's answer: an allele is a variant of a gene in a population; there are many many possible alleles for a given gene, depending on the length of the gene, though typically only a few are common in a population and even fewer may be known.

The second use of the word "allele" is to mean "copy" of a gene; because those copies can be different, in this context an allele is a potential variant of a gene in an individual. For a diploid organism like a human, you might say that an individual has "two alleles" but what you really mean to say is that individual has "two copies of a gene, which could be the same or different alleles." The relationship between the two copies is called zygosity. I'd argue that this is a slightly sloppy use of the term, but nonetheless it is common and if you understand the meaning it is still clear.

Genes for hemoglobin

For hemoglobin, there are at least 3 important genes: two each encode alpha subunits, and the third encodes the beta subunit (there is also a delta and gamma subunit, but we can omit discussion of those for now).

For the beta subunit, each individual has two copies of the gene, which in human populations are typically thought of as one of two population alleles: either a normal allele or an allele associated with sickle cell anemia. Individuals with two of the sickle cell alleles will have sickle cell anemia.

For the alpha subunit, each individual has two copies of two different genes. There are alleles for each of those genes that produce non-functional products. Individuals with alleles that produce non-functional alpha subunits, for either gene, have Alpha-thalassemia. The severity of Alpha-thalassemia depends on how many alleles are present across the two genes that do not product functional alpha subunits.

Why 4 alleles for hemoglobin??

I suspect if you read somewhere that there are "4 alleles" for hemoglobin, that source was probably talking about Alpha-thalassemia in particular, in which case there are indeed 2 copies of 2 different genes so that an individual has four possible alleles. The severity of Alpha-thalassemia depends on the total number of defective alleles across the two genes, where having 4 defective copies is fatal, and having just 1 defective copy is not noticed clinically.

In the population, however, it is likely that there are actually many other alleles for each gene. For the purpose of describing disease, however, we can group these into "functional" and "non-functional" and say that there are two population alleles for each of these two genes.