<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_stages(self, matrix_name):
 """ Number of registered stages for given matrix name. Parameters: matrix_name (str):
 name of the matrix Returns: int: number of reported stages for given matrix name. """

        return len(self.data[matrix_name]) if matrix_name in self.data else 0