5 prior misdemeanors, gun was not loaded, gun registered to defendent
The first thing that has to be considered is what charges you're actually facing. In Philadelphia, gun charges come under three main types: 6105 (a prior "felon" not to possess a firearm), 6106 (carrying concealed or in a vehicle without a carry permit), and 6108 ("open-carrying" a firearm on the streets of Philadelphia without a carry permit).
6105 Applies to individuals whose prior convictions (most, but not all felonies and some combination of misdemeanors) make them ineligible to possess any time of gun (shotgun, rifle, or handgun). It also applies if you meet one of several other criteria (including, but not limited to, being a fugitive from justice, having a Protection From Abuse Order, or a person involuntarily committed to a mental facility). It is generally a Felony of the Second Degree, carrying MAXIMUM imprisonment term of 5-10 years.
6106 Applies to individuals who do not have a valid license to carry firearms (carry permit) for Pennsylvania. In Philadelphia, it is charged as a Felony of the Third Degree, carrying a MAXIMUM imprisonment term of 3.5 - 7 years. There are about 15 exceptions to the 6106 statute, however, that make it a Misdemeanor of the First Degree for people "otherwise eligible" to possess a license to carry a firearm, which has a MAXIMUM imprisonment term of 2.5 - 5 years.
It's important to note that actually receiving the maximum penalty for these types of offenses without some factor you haven't mentioned would be rare. Talking to your lawyer about sentencing guidelines as they apply to you would be most helpful, as he can tell you what your mitigated, aggravated, and standard guideline ranges would be, as well as give you specific advice as it pertains to your case.