We're all walking around in a soup of Wi-Fi signals, but researchers say they can be put to another use -- counting people.

When people cross the path of a Wi-Fi signal, it weakens somewhat. That effect can be measured and provide a rough head count, according to researchers at the University of California, Santa Barbara (UCSB).

The technology could be used for applications such as making buildings more energy efficient by adjusting the temperature according to the number of people inside.

In a series of simple experiments, a Wi-Fi router and receiver on two Pioneer 3-AT wheeled robots were placed on either side of areas indoors and outdoors. A number of people walked around the area, weakening the Wi-Fi signals going from one robot to the other. The people didn't carry any communication equipment.

By analyzing the way the signal was changed -- either weakening or being scattered -- by the presence of the people, the researchers could estimate their number through a mathematical model.

The method was fairly accurate, usually being off by one or two people out of a group of up to nine, even when people crossed the path of the signal multiple times.

"For a lot of applications, an exact number may not be needed but rather a fairly accurate assessment could do the job," Yasamin Mostofi, a UCSB professor of electrical and computer engineering who has also experimented with Wi-Fi to give drones the ability to "see through" walls, said via email.

Mostofi believes the method could be scaled. Apart from smart buildings, it could help first responders by providing an estimate of the number of people in a disaster. Stores could also use it to better plan merchandise layouts.

Mostofi isn't sure of the maximum number of people that can be estimated, but she plans to expand the experiment to include a Wi-Fi network in a building and discover the fundamental limits of the method.