The answer depends entirely on which scale you're talking about—and understanding the difference unlocks music theory's underlying logic.
The chromatic scale contains 12 notes, each a semitone (half step) apart. On piano, it's every key—white and black—from C to the next C: C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, B. This is the complete palette of Western equal temperament; every other scale is a subset.
The most common scales—major (Ionian) and natural minor (Aeolian)—contain 7 notes before repeating at the octave. They follow specific whole/half step patterns:
The 8th note is the octave—same pitch class, double frequency.
7-note diatonic scales balance variety and coherence—enough notes for rich harmony, few enough for strong tonal center. 12-note chromaticism provides the complete harmonic universe. Both numbers reflect deep acoustic principles: the 12-tone equal temperament approximates just intonation's pure ratios; the 7-note diatonic set emerges naturally from the circle of fifths.
So: 12 notes available, 7 in the standard toolkit, 5 in the global folk toolkit. The rest are specialized colors for specific musical languages.