There are twelve major and twelve minor keys (properly called “modes"). This is because a scale can start on any note, and there are twelve notes within an octave: seven white notes and five black notes on a keyboard. Each major key has its own key signature. The relationship between the keys is explained in the article "circle of fifths". Each minor key shares a key signature with one of the major keys.