Sorry, not enough information to answer this and believe that you need to ask your lawyer as it appears you are currently represented. Good luck.
Any response given is not to be taken as legal advice or to create an attorney client relationship.
In most jurisdictions drug possession must be knowing and intelligent, but unfortunately the court isn't just going to take your word for it. I know we're taught that everyone is innocent until proven guilty, but in practice, you'd have to prove that you didn't know what the pills were. Proving a negative is pretty hard. Hopefully there are other defenses available to you, but regardless you need to contact and Arizona criminal defense attorney, at least for a consultation.
The first thing is the likely possibility of you being able to win your case. Remember the state has to prove you did it. You do not have to show you did not do it. Having said that, what you are looking at depends on the felony class level, if you were on probation when the offense occurred and your prior history. A lawyer could look at all these facts and give you some direction. Give one a call and see what they say.