Sure. Just take your pick of any sidebar plugin (i.e. serendipity_plugin_templatedropdown). Create a new dir like serendipity_plugin_spamstat, rename the file, change the classname within the PHP file, adjust the introspect() variables for something meaningful. Then everything you need goes into the generate_content() method:
echo 'Statistik1:';
$rows = serendipity_db_query("SELECT count(*) AS counter FROM ... ....");
echo $rows['counter'];
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/