You've been given an answer, but I hope you have also understood where you were going wrong. It looks to me as if you were thinking along the lines "process all the records, and if the record matches my criteria, then count it." That's record-at-a-time thinking, and you've got to change your mindset to think in terms of processing sets of records a a time (or elements or nodes or whatever).
The count() function tells you how many items there are in a supplied set of items; so you need an expression that selects the set of items of interest, and then apply the count() function to the result. In your case the set of interest is a subset of all the entry nodes, specifically that subset for which language/@lang='DE'. You could translate this literally as
but if there's a one-to-one correpondence between entry elements and @lang attributes then you get the same answer with
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference