Not able to understand editorial of Counting liars

Its been 2 days since i started this problem from basic complete search (bronze) and was able to figure it out a little but in the end got stuck. I decided to check the editorial today and i wasnt able to understand many things in there T_T Please help