In wireless sensor networks(WSNs), clustering provides an effective way of extending the lifetime of a sensor network. In order to achieve better overall network performance, the optimal number of clusters should be considered in hierarchically structured WSNs. Under the condition that a large number of sensors with randomly deployment obey Poisson distribution, we propose an optimization analytical model for the energy consumption of clustering protocol in WSNs. The theoretical analysis and simulation results show that the node density under Poisson distribution affects the optimal cluster numbers, and results in the lowest energy consumption of clustering protocol.