Creates a termIndex and termCount array by tallying how often each distinct term id occurs in the given set of observed terms.
Creates a termIndex and termCount array by tallying how often each distinct term id occurs in the given set of observed terms. If any term occurs more than Short.MaxValue times, all counts are downscaled by (Short.MaxValue - 1.0) / maxTermCount, rounding up to the nearest whole Short.