For people that would ever need something the same, it was easy, most work is figuring out what your mysql access codes are.
This php code, named "count_pictures.php" will display nothing but number of images registered in zenphoto. It is was I needed. (The output is less than 64 bytes)
`
<?php
$link = mysql_connect('localhost',....);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
if (!mysql_select_db(...)) {
die('Could not select database: ' . mysql_error());
}
$result = mysql_query("SELECT count(*) FROM [code]zp_images[/code]");
if (!$result) {
die('Could not query:' . mysql_error());
}
echo mysql_result($result, 0);
mysql_close($link);
?>
`