Suppose we need to deploy a wireless sensor network for collecting data to a sink node in a rural area that guarantees to run for a given lifetime. The specific points to deploy the sensor nodes are known. Suppose further that the battery of a sensor node cannot last for that long and the only means to achieve the required lifetime is to deploy redundant sensor nodes at each deployment point. The problem is: what the minimum number of sensor nodes is to meet the given lifetime. In this thesis, we solve this optimization problem. We will model the network as a graph G = (V, E), where vertices are the spots (deployment points) to deploy sensor nodes and edges indicate reliable wireless communications between the two end vertices. Since sensed data are transmitted to the sink node through a data gathering mesh, a solution to the above problem must consider how data are routed in the mesh. Therefore, our solution comes in two steps: one is an energy-aware forwarding scheme (EAF) that selects forwarding paths with the least deployment cost, and the second is a refinement heuristic to improve the initial solution by reallocating the traffic load. We evaluate our algorithm through random network with various sizes. Our solutions are compared with, and are close to corresponding lower bounds. Additional, our algorithm successfully minimize the remaining energy , or the waste of networks.