Shannon dimensionality of quantum channels and its application to photon entanglement