Sir , the 24 coach restriction(so called) on Indian trains is becuse of the signalling constraints , which can't be overlooked even by a goods trains. Moreover neither you nor I have have measured the lengths of freight and passenger trains..but so far as I'v noticed , they are of 'nearly' same length.
Regards