The objective of the study was to demonstrate that more than two types of materials can be effectively separated with x-ray CT using a recently developed energy resolved photon-counting detector. We performed simulations and physical experiments using an energy resolved photon-counting detector with six energy thresholds. For comparison, dual-kVp CT with an integrating detector was also simulated. Iodine- and gadolinium-based contrast agents, as well as several soft-tissue- and bone-like materials were imaged. We plotted the attenuation coefficients for the various materials in a scatter plot for pairs of energy windows. In both simulations and physical experiments, the contrast agents were easily separable from other non-contrast-agent materials in the scatter plot between two properly chosen energy windows. This separation was due to discontinuities in the attenuation coefficient around their unique K-edges. The availability of more than two energy thresholds in a photon-counting detector allowed the separation with one or more contrast agents present. Compared with dual-kVp methods, CT with an energy resolved photon-counting detector provided a larger separation and the freedom to use different energy window pairs to specify the desired target material. We concluded that an energy resolved photon-counting detector with more than two thresholds allowed the separation of more than two types of materials, e.g., soft-tissue-like, bone-like, and one or more materials with K-edges in the energy range of interest. They provided advantages over dual-kVp CT in terms of the degree of separation and the number of materials that can be separated simultaneously.