superslick, try this in functions.php:
function number_postpercat($idcat) {
global $wpdb;
$query = "SELECT count FROM $wpdb->term_taxonomy WHERE term_id = $idcat";
$num = $wpdb->get_col($query);
echo $num[0];
}
And then call it with <?php number_postpercat (4); ?>
in your template…
Works for me on WP 2.6