The circle of the fifths is here pictured
The outer red circle is the "major part" of the circle. The inner green circle is the "minor part". For a given key, say C, we have the relative key A found at same place on the inner circle. This key contains the same notes but with a different tonic. That is the C major scale contains the same notes as the A minor scale.
An isolated tone is called tonic. If we focus on E as tonic we can see in the circle that the E major scale contains 4 sharps and zero flats. It is written as thus e f g\s a b c\s d\s For G♭ we have 5 flats and 6 sharps. Taking one step clock wise we reach the dominant. For E we get B. One step counter clockwise we reach the subdominant. For E we get A. The dominant is placed 7 semi tones higher than the tonic. The subdominant is placed 5 semitones higher that the dominant. If we ascend in either natural minor or major, we reach the dominant 5 steps higher than the tonic. We reach the subdominant using both scales 4 steps higher.
Sharp and flat notation can refer to same key. That is D♭ equals C♯.