Ok, so what I think you should do going forward:
Always open the boxes in the pharmacy, as I have mentioned I always do this now after catching an error a few years ago and there are mistakes. It's much easier to fix at the pharmacy because once you have walked out they get arsey about it.
Medications are made up in the amount your doctor requests and so they are not always made up of sealed boxes. So for example for a while I was on amytriptyline and I needed one sealed box and half a sealed box. They would open a box and then put what I needed in a new box, seal it and label it. So if you are getting an amount that is not made up of whole sealed boxes it is possible a mistake has been made in terms of how many are in the box. I have had this error.
I also do a medication audit every Saturday. I literally go through and count all my meds and work out how many days (weeks) I have left of each. I'm quite severely disabled following an accident and I take a lot of meds so this helps me keep on top of what I have. I then order (app or on paper) whatever I'm running low on.
In terms of checking the pain meds you are on - I saw a pain specialist. I was on tramadol for about 18 months/ 2 years. He added in an SSRI (I started on amytriptyline) which basically dials down the nerves which transmit pain. So it's not a painkiller in the standard sense of the word. It also makes you drowsy, so I took it at night and it really helped my sleep - previously I was waking up in pain a lot of the time.
I then started to step down on the pain ladder. The amytriptyline reduced the volume of the pain if you like, and I switched to using paracetamol plus codeine alternated with naproxen sodium for the pain.
Tramadol made me feel quite nauseous. I found the amytriptyline/para+codeine/naproxen an improvement in terms of pain control to be honest even though theoretically tramadol is a more powerful painkiller.
I'm ten years down the line now. On good days and in the summer I can manage on just over the counter painkillers - paracetamol and ibuprofen. On bad days or in the winter I use para + 30mg codeine and naproxen sodium.
I take duloxetine instead of amytriptyline now - and yes to whoever asked (sorry) I sweat like a pig. Better than pain though!