In Apex, the scale() method is used to return the scale of the Decimal, that is, the number of decimal places.
scale()
Decimal d1 = 9.27400968; System.debug(d1.scale());
Output: 8