First and foremost, d-block elements and transition elements are two different entities.
These terms become not exchangeable as you start using current IUPAC definition of transition element (see M. Farooq's answer).
Older textbooks included entire d-block, including Group 12 elements, into transition elements cohort because historically the name "transition" referred to the generic chemical properties ranging in-between those of elements from s- and p-blocks, at the same time ignoring lanthanoids and actinoids.
I think I found quite a strict yet simple definition that is also aligned with the IUPAC's one, and allowing to actually count the transition elements [1, p. 1357]:
transition element.
(transition metal).
Any of a number of elements in which the filling of the outermost shell to eight electrons within a period is interrupted to bring the penultimate shell from 8 to 18 or 32 electrons.
Only these elements can use penultimate shell orbitals as well as outermost shell orbitals in bonding.
All other elements, called “major group” elements, can use only outermost shell orbitals in bonding.
Transition elements include elements 21 through 29 (scandium through copper), 39 through 47 (ytterbium through silver), 57 through 79 (lanthanum through gold), and all known elements from 89 (actinium) on.
All are metals.
Many are noted for exhibiting a variety of oxidation states and forming numerous complex ions, as well as possessing extremely valuable properties
in the metallic state.
Following this definition, there are nine transition elements in 3d-series, nine in 4d-series, 23 in 5d-series (including lanthanoids, the inner transition elements) and [currently] 30 in 6d-series (provided there are 118 elements and oganesson is the heaviest known element), totaling 71 transition elements (2021):
Adapted from Periodic table, not highlighted.svg by Crossover1370
Strictly speaking, there is little known about electron configuration for elements with $Z > 108,$ so calling out an exact number of transition elements is likely going to be considered a bold move for the foreseeable future.
Reference
- Hawley’s Condensed Chemical Dictionary, 16th ed.; Larrañaga, M. D., Lewis, R. J., Lewis, R. A., Hawley, G. G., Eds.; John Wiley & Sons, Inc: Hoboken, New Jersey, 2016. ISBN 978-1-118-13515-0.