Tamino Api and count()

Hi all,
we are using tamino ver 2.2.1.9 and accesing to the db via the tamino Api for Java.
The following query works well from the Tamino Interactive Interface but gives a Servlet error 500 when using it in the tamino.query method.

count(myDoctype[myChild=“child1”])

Any idea?
Does anyone experienced problems when using xquery functions and the java Api?

Thanks.

Gorka.

The following works for me against a more recent TaminoClient.jar:

TaminoClient tamino = new TaminoClient(“http://localhost/tamino/auto-test-db/ino:etc”);

TaminoResult res = tamino.query(“count(*)”);

System.out.println("res: "+res.toXmlString());