Added loop count for js.