Calculate the Total Number of Subnets