In some species of cricket, the number of chirps per minute used by the male to attract females rises and falls along with the outside temperature, and can in fact be used as a rough thermometer.
Since insects are small (with a high surface-to-volume ratio) and cold-blooded, with relatively slow metabolisms unless they are exerting themselves, their temperatures reflect the outside temperature. Muscular activities such as chirping tend to vary with that temperature.
The formulas for determining the surrounding temperature depend on counting the chirps in a certain number of seconds, usually 13 to 15, and adding a constant number, usually from 37 to 40.
The most carefully studied species for this purpose is the widely distributed snowy tree cricket, Oecanthus fultoni Walker.
Scientists have determined that by counting how often it chirps in 15 seconds and adding 40, a consistent approximation of the temperature in degrees Fahrenheit can be obtained.
Each species makes a different sound, and the chirping speed varies between species as well. There are silent crickets among the 3,000 or so known species (they use scent to attract mates) and even a few katydids that chirp faster to warm themselves up.