Studying tumor microenvironment may identify prognostic or predictive biomarkers of clinical response to immunotherapy. Presented here, is an innovative method based on in situ fluorescence multispectral imaging to analyze and count automatically various subpopulations of CD8+ T cells. This reproducible and reliable technique is suitable for large cohort analyses.