Is there a way in Trados Studio to get a wordcount from the Target language?

Yes, you can save the target document and get a wordcount then, but specially with "exotic" file types this is not always easy.

And moreover, I would need a way to eventually get that number programmatically. 

Any ideas? (Besides going through the XLIFF and count it there?)