Hello,
...for anyone who is interested in...
In the meantime I have found a way to count any nodes regardless if they are in a primary or a secondary data source.
And it´s really easy. You just can take an 'expression box' control.
Within this expression box use the 'count' function of XSD.
For example if you want to count the elements of a repeating table the expression looks like:
count(my:groupname/my:fieldname)
With this you can also count records of a secondary data source even with filter conditions.
Hope this helps anyone