Lets look at a diatonic scale, [C-->B = 264, 297, 330, 352, 396, 440, 495] so major (triad) chords have notes with frequencies in the classic ratios of 4:5:6 and minors in the ratios 10:12:15. Lets look at the scale of C major/ionian | A minor/aeolian. All the chords from letter notes (no sharps or flats is in the sequence:
F A C E G B D
Note that 3 successive notes is a chord, major if you start on an odd numbered letter and minor if you start on an even numbered letter. We can reverse this ordering by using:
F Ab C Eb G Bb D or F# A C# E G# B D#
From that we can easily go back to the original ordering with:
F# A# C# E# G# B# D# and Fb Ab Cb Eb Gb Bb Db
One discovers with these that to keep the major and minor chord ratios all flats must be 24/25 times the note frequency, and all sharps are 25/24 times the note frequency. A just intonation scale is these 21 notes (based on A=440). This scale includes E#, Fb, Cb, and B#, all rather rarely found. A 12 tone equal temperament scale (commonly abreviated 12TET) only approximates the classical ratios.
Note that the number of chords possible is quite large and depends on the scale used. An experimental consonance distribution is given in Juan G. Roderer's 'The Physics and Psychophysics of Sound', 3rd edition, p. 167, 1995, and note pairs judged consonant by 60% or more untrained ears ranged from a minor 3rd (6/5 ratio) to a major 5th (3/2) ratio, and peaking at just over 80% of ear-pairs for a ratio just barely over a major 3rd (5/4 ratio). Throw in another note or two (using the same ratio range again) and, depending on how many notes are in your scale, you can make a big pile of chords. [Untrained ears were used since a professional singer or musician would listen for what they were trained to listen for.]