and you get to the note D - D major contains 2 sharps. Continue this process through the cycle of fifths, to A, E, B, F# and C#, the last of which contains 7 sharps in the key signature.