Any doubt concerning the number of Rak'ats in those prayers which consist of two or three Rak'ats, will render the Salat void.
If one doubts about the number of the first two Rak'ats, of Salat having four Rak'ats, (like, Zuhr, Asr and Isha), his Salat will be void if he continues to be in doubt.