def METHOD_NAME(self, count):
    """Check the number of legends in the CurveLegendsWidget"""
    children = self.legends.findChildren(CurveLegendsWidget._LegendWidget)
    self.assertEqual(len(children), count)