Solar and stellar flares: frequency, active regions and stellar dynamoстатья