Fixed global letter count logic