diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index 8a4373ef17654a298a8e668de46d870e18c29043..68e9fa70c0939173df4789b42530d51eda498c67 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -1087,11 +1087,33 @@ class CommentRdfaTestCase extends CommentHelperCase {
     $this->drupalLogout();
   }
 
+  /**
+   * Tests the presence of the RDFa markup for the number of comments.
+   */
+  function testNumberOfCommentsRdfaMarkup() {
+    // Posts 2 comments as a registered user.
+    $this->drupalLogin($this->web_user);
+    $this->postComment($this->node1, $this->randomName(), $this->randomName());
+    $this->postComment($this->node1, $this->randomName(), $this->randomName());
+
+    // Tests number of comments in teaser view.
+    $this->drupalGet('node');
+    $comment_count_teaser = $this->xpath("//div[contains(@typeof, 'sioc:Item')]//li[contains(@class, 'comment_comments')]/a[contains(@property, 'sioc:num_replies') and contains(@content, '2')]");
+    $this->assertTrue(!empty($comment_count_teaser), t('RDFa markup for the number of comments found on teaser view.'));
+
+    // Tests number of comments in full node view.
+    $this->drupalGet('node/' . $this->node1->nid);
+    $node_url = url('node/' . $this->node1->nid);
+    $comment_count_teaser = $this->xpath("/html/head/meta[@about='$node_url' and @property='sioc:num_replies' and @content='2']");
+    $this->assertTrue(!empty($comment_count_teaser), t('RDFa markup for the number of comments found on full node view.'));
+  }
+
+
   /**
    * Tests the presence of the RDFa markup for the title, date and author and
    * homepage on registered users and anonymous comments.
    */
-  function testAttributesInRdfaMarkup() {
+  function testCommentRdfaMarkup() {
 
     // Posts comment #1 as a registered user.
     $this->drupalLogin($this->web_user);
@@ -1141,7 +1163,7 @@ class CommentRdfaTestCase extends CommentHelperCase {
   }
 
   /**
-   * Helper function for testAttributesInRdfaMarkup().
+   * Helper function for testCommentRdfaMarkup().
    *
    * Tests the current page for basic comment RDFa markup.
    *
diff --git a/modules/node/node.module b/modules/node/node.module
index 95ee5661240436552b07697d21d4e17882da49d2..a55fd039a94fc70c037286afa5801279393e5710 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -810,6 +810,9 @@ function node_rdf_mapping() {
         'name' => array(
           'predicates' => array('foaf:name'),
         ),
+        'comment_count' => array(
+          'predicates' => array('sioc:num_replies'),
+        ),
       ),
     ),
   );
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module
index 7993b24c7667bc74dd41f59c525e5033d4c10182..73a2ec03aad0113b161fe0daaa6543f12e80bdfa 100644
--- a/modules/rdf/rdf.module
+++ b/modules/rdf/rdf.module
@@ -405,7 +405,7 @@ function rdf_preprocess_node(&$variables) {
     if (!empty($variables['node']->rdf_mapping['title']['predicates'])) {
       $element['#attributes']['property'] = $variables['node']->rdf_mapping['title']['predicates'];
     }
-    drupal_add_html_head($element, 'rdf_node');
+    drupal_add_html_head($element, 'rdf_node_title');
   }
 
   // Adds RDFa markup for the date.
@@ -417,6 +417,29 @@ function rdf_preprocess_node(&$variables) {
   if (!empty($variables['rdf_mapping']['uid'])) {
     $variables['rdf_template_variable_attributes_array']['name']['rel'] = $variables['rdf_mapping']['uid']['predicates'];
   }
+
+  // Adds RDFa markup annotating the number of comments a node has.
+  if (isset($variables['node']->comment_count) && !empty($variables['node']->rdf_mapping['comment_count']['predicates'])) {
+    // Annotates the 'x comments' link in teaser view.
+    if (isset($variables['content']['links']['comment']['#links']['comment_comments'])) {
+      $comment_count_attributes['property'] = $variables['node']->rdf_mapping['comment_count']['predicates'];
+      $comment_count_attributes['content'] = $variables['node']->comment_count;
+      $variables['content']['links']['comment']['#links']['comment_comments']['attributes'] += $comment_count_attributes;
+    }
+    // In full node view, the number of comments is not displayed by
+    // node.tpl.php so it is expressed in RDFa in the <head> tag.
+    if ($variables['page'] && user_access('access comments')) {
+      $element = array(
+        '#tag' => 'meta',
+        '#attributes' => array(
+          'about' => $variables['node_url'],
+          'property' => $variables['node']->rdf_mapping['comment_count']['predicates'],
+          'content' => $variables['node']->comment_count,
+        ),
+      );
+      drupal_add_html_head($element, 'rdf_node_comment_count');
+    }
+  }
 }
 
 /**