The other way around. There are 7 notes and the accidentals give us a 12-tone chromatic scale.
I was always taught there are 12 notes, while any standard scale contains only 7 of them. (The chromatic scale obviously being the exception which contains all 12.)
Accidentals are just for notation -- obviously B-flat and A-sharp are the same "note", just as F-sharp-sharp and G are.
Our entire turning of equal temperament is based on 12 equal intervals, not 7. So I'd argue parent commenter is correct -- notes are base 12, not base 7.
So...one could argue for either or both interpretation and explanation. The note names, sharps and flats, is what is most arbitrary about it.