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.