There are fifteen possible key signatures: up to seven sharps, up to seven flats, or no sharps or flats. The reason why there are fifteen and not twelve is because three of them have two possible names: F sharp major (6 sharps) can also be called G flat, C sharp is D flat and B is C flat. We call these enharmonic i.e. the same note but with a different name.