How to Define Custom Number of Items in Comment Feed

There’s a filter for that! The filter comment_feed_limit can be used to adjust the LIMIT clause directly. By default, the option from Settings -> Reading is used (“Syndication feeds show the most recent”), but that’s used for other feeds as well. The comment_feed_limit filter is used exclusively for comment feeds.

add_filter( 'comment_feed_limits', 'wpse150187_comment_feed_limits' );

function wpse150187_comment_feed_limits( $limit ) {
    return 'LIMIT 40';
}