Importance of counter-rotating coupling in the superfluid-to-Mott-insulator quantum phase transition of light in the Jaynes-Cummings lattice