UPDATE: I've looked at this question for some hours, checking the tcolorbox and cleveref documentation (I even asked here for something related to this, although the MWE I initially did was a mess and I deleted the question afterwards), but @cfr gave me clues and finally I found a solution to your problem.
You can create and use your own counters, and the tcolorbox package can use them by giving their names when creating the box structure (see the commands \newtcolorbox, \newtcbinputlisting and \newtcblisting in pasted file mwe.tex). Inside the box, e.g. the title property, you have to use \thetcbcounter to retreive the value of the counter you've just linked. And regarding cross-referencing, \crefname is your best friend (see those commands in the given mwe.tex file).
For more information, check the tcolorbox and cleveref documentation.
Here is the working solution (file mwe.tex):
\documentclass{article}
\newcounter{commentCount}
\newcounter{filePrg}
\newcounter{inputPrg}
\usepackage{geometry}
\geometry{paper=letterpaper,margin=2cm}
\usepackage{ifthen}
\usepackage{fontawesome}
\usepackage[dvipsnames]{xcolor}
\usepackage{tabularx}
\newcolumntype{\CeX}{>{\centering\let\newline\\\arraybackslash}X}%
\newcommand{\TwoSymbolsAndText}[3]{%
\begin{tabularx}{\textwidth}{c\CeX c}%
#1 & #2 & #3
\end{tabularx}%
}
\usepackage{minted}
\usepackage[many]{tcolorbox}
\tcbuselibrary{listings}
\tcbuselibrary{minted}
\newtcolorbox[use counter=commentCount, number format=\arabic]{commentBox}[2]{
size=title,
arc=1.5mm,
breakable,
enhanced jigsaw,
colframe=Black,
coltitle=White,
boxrule=0.5mm,
colback=White,
coltext=Black,
title=\TwoSymbolsAndText{\faCheck}{%
\textbf{Comment \thetcbcounter}\ifthenelse{\equal{#1}{}}{}{\textbf{:} \textit{#1}}%
}{\faCheck},
label=comment:#2,
}
\newtcbinputlisting[use counter=filePrg, number format=\arabic]{\codeFromFile}[4]{%
listing engine=minted,
minted language=#1,
listing file={#2},
minted options={autogobble,linenos,breaklines},
listing only,
size=title,
arc=1.5mm,
breakable,
enhanced jigsaw,
colframe=brown,
coltitle=White,
boxrule=0.5mm,
colback=white,
coltext=Black,
title=\TwoSymbolsAndText{\faCode}{%
\textbf{File program \thetcbcounter}\ifthenelse{\equal{#3}{}}{}{\textbf{:} \textit{#3}}%
}{\faCode},
label=filePrg:#4
}
\newtcblisting[use counter=inputPrg, number format=\arabic]{codeInput}[3]{
listing engine=minted,
minted language=#1,
minted options={autogobble,linenos,breaklines},
listing only,
size=title,
arc=1.5mm,
breakable,
enhanced jigsaw,
colframe=brown,
coltitle=White,
boxrule=0.5mm,
colback=white,
coltext=Black,
title=\TwoSymbolsAndText{\faCode}{%
\textbf{Input program \thetcbcounter}\ifthenelse{\equal{#2}{}}{}{\textbf{:} \textit{#2}}%
}{\faCode},
label=inputPrg:#3
}
\usepackage{cleveref}
\crefname{commentCount}{comment}{comments}
\crefname{filePrg}{file program}{file programs}
\crefname{inputPrg}{input program}{input programs}
\begin{document}
\begin{commentBox}{My first comment}{first}
My first comment here! \faTree
\end{commentBox}
\begin{codeInput}{c}{A welcome program.}{code01}
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
\end{codeInput}
\codeFromFile{java}{HelloWorld.java}{Another welcome program.}{code01}
See \cref{comment:first} for details. Also, look for \cref{inputPrg:code01} and \cref{filePrg:code01} for further assistance.
\end{document}
This is the HelloWorld.java file used by mwe.tex (if you're running this example, make sure to have this file in the same folder of mwe.tex):
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
I compiled it using latexmk -xelatex -shell-escape mwe.tex.
And here is the output of the compiling process:

Hope this helps!
tcbinputlistingnot working? – Apr 15 '16 at 14:03