Most of the time it has four, but technically the whole note is as long as the entire (whole) measure. Since 4/4 is the most common time signature the whole note usually equals 4 beats but in say,...
there are no whole notes in a half beat please think if it's called a half note then it's half of a whole note a whole note is 4 beats so half of 4 is 2.