Optimal design of energy-efficient cooperative WSNs: How many sensors are needed?