Nucleus segmentation and counting play a crucial role in many cell analysis applications. However, the dense distribution and blurry boundaries of nucleus make nucleus segmentation tasks challenging. This paper proposes a novel segmentation and counting method. Firstly, TC-UNet++ is proposed to achieve a global segmentation. Then, the distance watershed method is used to finish local segmentation, which separate the adhesion and overlap part of the image. Finally, counting method is performed to obtain information on the counting number, area and center of mass of nucleus. TC-UNet++ achieved a Dice coefficient of 89.95% for cell instance segmentation on the Data Science Bowl dataset, surpassing the original U-Net++ by 0.23%. It also showed a 5.09% improvement in counting results compared to other methods. On the ALL-IDB dataset, TC-UNet++ reached a Dice coefficient of 83.97%, a 7.93% increase over the original U-Net++. Additionally, its counting results improved by 16.82% compared to other approaches. These results indicate that our method has a more complete and reasonable nucleus segmentation and counting scheme compared to other methods.