The nanoparticle agent, combined with a targeting factor reacting with lesions, enables specific CT imaging. Thus, the identification of the nanoparticle agents has the potential to improve clinical diagnosis. Thanks to the energy sensitivity of the photon-counting detector (PCD), it can exploit the K-edge of the nanoparticle agents in the clinical x-ray energy range to identify the agents. In this paper, we propose a novel data-driven approach for nanoparticle agent identification using the PCD. We generate two sets of training data consisting of PCD measurements from calibration phantoms, one in the presence of nanoparticle agent and the other in the absence of the agent. For a given sinogram of PCD counts, the proposed method calculates the normalized log-likelihood sinogram for each class (class 1: with the agent, class 2: without the agent) using the K nearest neighbors (KNN) estimator, backproject the sinograms, and compare the backprojection images to identify the agent. We also proved that the proposed algorithm is equivalent to the maximum likelihood-based classification. We studied the robustness of dose reduction with gold nanoparticles as the K-edge contrast media and demonstrated that the proposed method identifies targets with different concentrations of the agents without background noise.