Who is "righteous"? The Rambam adopts a very simple definition: A righteous person is one who is more good than bad:
כָּל אֶחָד וְאֶחָד מִבְּנֵי הָאָדָם יֵשׁ לוֹ זְכֻיּוֹת וַעֲוֹנוֹת. מִי שֶׁזְּכֻיּוֹתָיו יְתֵרוֹת עַל? עֲוֹנוֹתָיו צַדִּיק. וּמִי שֶׁעֲוֹנוֹתָיו יְתֵרוֹת עַל זְכֻיּוֹתָיו רָשָׁע -- Each and every one of the sons of man has virtues and vices. He whose virtues exceed his vices is a righteous man (צַדִּיק) and he whose vices exceed his virtues is an evildoer (רָשָׁע). [Mishneh Torah, Sefer Madda, Laws of Repentance 3:1]
But what practical value does this definition have for determining whether a person is righteous or not? It conjures up images of a point system, in which every action is assigned a positive or negative value, and if the sum is positive you are righteous. Such a system does not exist in Judaism.
So is the Rambam just trying to tell us, "Don't be too hard on yourself. The bar is not as high as you think." ?