We report on a new photon-counting detector possessing unprecedented spatial resolution, moderate spectral resolution and high background-rejection capability for 0.1-100 keV X-rays. It consists of an X-ray charge-coupled device (CCD) and scintillator. The scintillator is directly deposited on the back surface of the X-ray CCD. Low-energy X-rays below 10 keV can be directly detected in the CCD. The majority of hard X-rays above 10 keV pass through the CCD but can be detected in the scintillator, generating optical photons there. Since CCDs have a moderate detection efficiency for optical photons, they can again be absorbed by the CCD. We demonstrate the high spatial resolution of 10 micron order for 17.4 keV X-rays with our prototype device.