In the case of employing Talbot interferometer to the medical imaging, a practical X-ray tube should be combined with the interferometer. Practical x-ray tubes radiate continuous X-rays and the interference intensity (so-called visibility) becomes worse because of the wide spectrum of continuous X-rays. In order to achieve high visibility, we have estimated the visibility improvement effect using the photon counting detector (PCD). The detected spectra using a 2D imaging PCD are distorted due to charge sharing and pileup, which would make visibility worse. First, we have made a model for Monte-Calro calculation to calculate the distorted spectra and point spread function (PSF) for the charge sharing. The calculation model is based on the summation of the monochromatic response function which is the detected charge on the interested pixel for one photon injection. Distortion of spectra was calculated taking into account the charge sharing effect and pulse pileup. Then we have obtained an estimation result of the visibility improvement effect using the PCD of CdTe. The visibilities of the energy integrating detector (EID) of CdTe and the PCD are calculated and compared, where the Talbot interferometer type is a fringe scanning using phase grating and absorption grating. Visibility of the EID is 36% and that of PCD is 60% without pileup effect. In high dose rate condition, the CNR decreasing ratio is remarkable. The visibility decreasing effect and quantum noise increasing effect are correlated and the both effect worsen the CNR.