Add NgramCounter class.