I have not come up with a definitive answer myself as there is a wide range of figures online.
Michael Noll-Hussong states on ResearchGate
The total number of specific diagnoses was reduced from 172 in DSM-IV to 157 in DSM-5.
see, e.g., McCarron RM. The DSM-5 and the art of medicine: certainly uncertain. Annals of internal medicine. 2013;159(5):360-1.
I have recently managed to access this referenced article (DOI: 10.7326/0003-4819-159-7-201310010-00688) and it states
The number of psychiatric disorders decreased from 172 (DSM-IV) to 152 (DSM-5). (This does not include disorders that are “Not otherwise specified” or “Other specified/unspecified.”)
The Huffington Post states that there are over 300 in DSM-5
Because of discrepancies in the information available I have seen, I have therefore, painstakingly gone through my copy of DSM-5 and pages 877—896 provide a
Numerical Listing of DSM-5 Diagnoses and Codes (ICD-10-CM)
ICD-10 codes are provided for cross-referencing, and I have counted roughly 742 of them by saying that a full page has 45 and there are 20 pages with some listings taking more than 1 line. The problem with the approximate figure of 742 is that in the list are items such as obesity which are not mental disorders.