Magnetic Schr\"odinger operators, spectral asymptotics, edge states