So after you unlock bootloader in samsung your device warranty is void as per samsung policy. So earlier there was thing that users used to locked the bootloader to claim the warranty back.
But in newer samsung device if you Unlock bootloader and root the device your KNOX counter will trip and once its done there is no going back for it (As of now).
KNOX counter also keeps the record of how many times the device has been flashed with different roms. So clearly samsung will get to know wether the device has been tampered or not.
KNOX counter is very advanced security system from samsung (RMM state is also the part of it).
So when to worry of KNOX counter ?
First things first if you Odin or samsung Kies to flash the device with STOCK ROM then the knox counter wont trip.
If you flash custom recovery i.e TWRP/CWM or a custom rom then it will tripped.