How to get the relationship count before the parent itemtype save

Hello everyone,

I need to check that user has added  at least one  relationship before save base on some item types fields, anyone know which event I should use and how to do that? Example is just like the picture below.