CCDs count photons in a particular fashion, and it happens to involve individual photons doing things. You might think of it as photons knocking electrons off of atoms, but it's actually semiconductors with a narrow bandgap, so CCDs work at much lower energies than needed for ionizing radiation.