Maximum likelihood estimation of joint size from trace length measurements