Right, I am trying this:
echo ($pages->count("Artist.Artist_works.Artist_works_inventory_no=1, Artist.Artist_firstname=" . $firstname . ", Artist.Artist_lastname=" . $lastname));
echo ($pages->count("Artist.Artist_works.Artist_works_inventory_no=1"));
and both return 1. Unfortunately when I set Artist_works_inventory_no=1 on more than one Artist_works (of the same Artist), it still counts only 1. I do not get it at all