The Circle of Fifths (shown above) is designed to help understand chord and key theory. It can also be used as a tool to aid in transposition. To determine the number of sharps or flats in a given key, look it up on the circle of fifths.
For instance, to play in the key of A, you can see that it has three sharps.
However, there's more to the story than this. You also need to know which notes are sharp or flat. There's a pattern to this as well. The first sharp is always F#, in the key of G. As you add sharps, keep following along the circle of fifths. So, for the key of D (two sharps), you have F# plus C#. The key of A includes one more sharp, the next one around the circle, G#.
Interested in playing in a flat key? A similar principle applies. The first flat is always Bb. So in the key of F, your one flat is Bb. To play in the key of Bb, you add the next note counter-clockwise. Thus, in Bb, you have a Bb and an Eb. The key of Ab will therefore include an additional Ab and Db.
The Circle of Fifths can also be applied as a chordfinder tool. Chords are often identified by roman numerals, based on their root. I.e., in the key of C, "I" will identify a C-maj chord, but "vi" (in lower case, as its a minor chord) will apply to the a-min chord.
The form below the image will allow you to choose a way to look at the various configurations. Although not a perfect tool, this should give the basic idea of how it works: choose a key and choose major or minor modes. Then you should get a display of the notes of the key you've chosen, along with the specific chords which go with each note. I.e., if you choose G Major, you'll see that your I-IV-V progression is G-C-D. Your ii-V-I progression is Am-D-G. This can be applied in any key.