Spain counts 40,197 new infections, all-time high