compare a value from \newcounter to value from \newcount
The name of the internal counter is \c@testB
. And \value will work if you remove the backslash.
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\begin{document}
\newcount\testA
\testA=1
\newcounter{testB}
\setcounter{testB}{1}
\makeatletter
\ifnum\testA=\c@testB
TRUE
\else
FALSE
\fi
\makeatother
\ifnum\testA=\value{testB}
TRUE
\else
FALSE
\fi
\end{document}
The solution is to use
\ifnum\testA=\value{testB}