State law categorizes local governments (including counties and school districts) in varying classes, based on population. There are no less than nine classes of county and five classes of school district, for example. There is only one class of borough, but there are two classes of township ... Upper St. Clair and everyone else. (But I kid, Upper St. Clair. Again, these classes are based on population alone.)
As for cities, there are four classes, three of which have only one city apiece. To be a city of the first class -- or as my people call it, "Philadelphia" -- you must have one million people or more. Second-class cities, a.k.a. Pittsburgh, have between 250,000 and 1 million people. A third category is reserved to cities of between 80,000 and 250,000 that decide they want the form of government -- not to mention the raw sex appeal -- of being designated a "second class city A." The sole city in this category is Scranton.
Every other city is "third class" -- which state law defines as having fewer than 250,000 people who have "not elected to become a city of the second class A." Not surprisingly, lots of places have chosen not to be grouped with Scranton: There are more than 50 third-class cities, including the Mon Valley towns of Clairton, Duquesne and McKeesport.