Most states and the federal government have “habitual offender” or “three strike” laws that require enhanced punishment for certain repeat felony offenders. (To learn more about these sentencing schemes, see Typical Three Strikes Laws.)
The purpose of three strikes laws is to take dangerous offenders out of society for a long period of time. The statutes are primarily concerned with offenders who commit “serious” or “violent” felonies. And some jurisdictions require that the defendant actually serve time in prison for an offense to qualify as a strike. But despite the emphasis on severe crimes, misdemeanors can in some circumstances qualify as strikes (see "Typical Three Strikes Laws," above).
Ultimately, determining which offenses count as strikes requires consulting the statute in question.