This is only a solution for the case that commas do not follow each other without element between or do not occur inside {} pairs:
\clist_count:n counts the number of elements in a comma separated list, however, {1,2} would give 2 instead of 1, so wrap \int_eval:n{\clist_count:n {#1} -1} around this.
Using the hint by egreg: \int_max:nn {\clist_count:n {#1} -1}{0} is shorter
Of course the \CountComma macro should be expandable, so use \NewExpandableDocumentCommand.
\documentclass{article}
\usepackage{xfp}
\ExplSyntaxOn
\NewExpandableDocumentCommand{\CountComma}{m}{% Should be expandable!
\int_max:nn { \clist_count:n {#1}-1 } {0}
}
\ExplSyntaxOff
\begin{document}
\CountComma{1/!/?,2/1/0,3+2/1*2,4/0,5/1/0,6/0,A/B/1,8/0,9/0}
\CountComma{1,2}
\CountComma{4}
\edef\foo{\CountComma{1,2,3}}
Foo is \foo
\end{document}
\clist_count:ninstead of\tl_count:n, however, it will not count commas that follow right each other, i.e.\CountComma{1,,,2}will give2and not3. It will also not count commas that are inside{,}– Dec 12 '17 at 22:22\NewExpandableDocumentCommand. – egreg Dec 12 '17 at 22:23