On the Number of Cluster Heads Minimizing the Error Rate for a Wireless Sensor Network Using a Hierarchical Topology over IEEE802.15.4