I have the following code:
\documentclass{article}
\usepackage{ifthen}
\usepackage{amsmath,amsfonts,amsthm,amssymb}
\newcommand{\probName}{}%
\newcounter{probCounter}%
\setcounter{probCounter}{1}
\newcounter{partCounter}%
\makeatletter
\newcommand{\howmany}[2][subsection]{%
\begingroup
\@namedef{the#1}{\arabic{#1}}%
\addtocounter{#1}{\m@ne}%
\refstepcounter{#1}%
\label{#2}%
\endgroup}
\makeatother
\newenvironment{prob}[1][]%
{\setcounter{partCounter}{0}
\renewcommand{\probName}{#1}%
\newcommand{\abc}{\ref{noPart:\arabic{probCounter}}}
\section{{Problem \arabic{probCounter}}{: \probName} (contains
\abc\
%\ifthenelse{\abc=0}{1}{\abc}\ %%%%%%%%%%%%%%%%%%%%%% does not work
parts) }% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wanna conditional parts/part
}{\howmany{noPart:\arabic{probCounter}}
\stepcounter{probCounter}%
}
\newcommand{\partName}{}%
\renewenvironment{part}[1][]%
{\stepcounter{partCounter}%
\renewcommand{\partName}{#1}%
\subsection{{Part \Alph{partCounter}}{: \partName}}
}{}
\newenvironment{ques}[1][]{
\ifthenelse{
\equal{#1}{}
}{}{
\ifthenelse{
\equal{#1}{1}
}{
\textbf{(#1 point)}
}{
\textbf{(#1 points)}
}}
}{}
\begin{document}
\begin{prob}[Prob 1]
\begin{part}
\end{part}
\begin{part}
\end{part}
\begin{part}
\end{part}
\end{prob}
\begin{prob}[Prob 2] %%%%%%%%%%% force to show => (contains 1 part)
\end{prob}
\begin{prob}[Prob 3] %%%%%%%%%%% correct the grammar => (contains 1 part)
\begin{part}
\end{part}
\end{prob}
\begin{prob}[Prob 4]
\begin{part}
\end{part}
\begin{part}
\end{part}
\begin{part}
\end{part}
\begin{part}
\end{part}
\end{prob}
\end{document}

Now I wanna it to be:
...
Prob 2 (contains 1 part) %% force it to be 1 part
Prob 3 (contains 1 part) %% get rid of the "s" from the wording (part"s")
...
The first thing come to my mind is conditional ifthenelse function, which also included in my code, but it doesn't work as expected.
