You should assume that you have performed 3 units (rakat) and finish the prayer after performing one more rakat. After you finish the prayer (saying salam), without turning to the sides (meaning you are still in prayer) you should pray one rakat Ihtiyat-prayer (standing) as an obligatory precaution. It is a one unit prayer which symbolize the third or forth rakat.