def METHOD_NAME(self):
    """Number of detected transients."""
    if self.lightcurves:
        lcs = json.loads(self.lightcurves)
        if lcs['lcs'] is not None:
            n_detected = len(lcs['lcs'])
        else:
            n_detected = 0
        return int(n_detected)
    else:
        return None