Determining Author post count

This thread on the wordpress codex shows how you can scope your SQL query:

$author_post_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author="" . $$username->ID . "" AND post_type="post" AND post_status="publish"");