Calculate number of words correctly when using subword models.