It is possible he was counting the same drug as two different drugs if he were given branded and generic, Valium and diazepam are the same thing as an example.
Drugs are withdrawn, new drugs become available, the efficacy of a drug can wear off after prolonged use so has to be changed, there can be a risk of dependency with some drugs so they are only used short term.
Often several drugs are used together. It is perfectly feasible that over such a long period of time 34 different drugs would be prescribed for psychiatric problems.