@Comfy.n: glad it works for you.
Another example: change the Series tooltip to show the number of books in the library with that series.
Result:
Template:
Code:
program:
if $series then
series_count = book_count('series:"""=' & $series & '"""', 0);
return $series & ', book ' & $series_index & ' of ' & series_count
fi;
return 'This book is not in a series'