"Number of Comments" in XML feeds in Wordpress

I got this working today in the Atom, RDF, and RSS 2.0 feeds. It’s not working in the RSS 1 feed, but WordPress’s RSS 1 feed sucks anyway, and if you’re using that feed you should change to a different one.

Using the RDF feed as an example, all I did was change this line:

<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>

to this:

<content:encoded><![CDATA[<?php the_content('', 0, '') ?><p><?php comments_popup_link('Comment now »', '1 Comment »', '% Comments »', 'commentslink'); ?></p>]]></content:encoded>

Hope that helps those of you who were looking to do something similar.