commit 6b7d2813f5b992e8efcdbd9ae8d77689e4e1bd34
Author: Karoly Negyesi <chx1975@gmail.com>
Date:   Thu May 19 02:02:55 2016 -0700

    expose flag count

diff --git a/src/FlaggingViewsData.php b/src/FlaggingViewsData.php
index 88c358e..dfab2dc 100644
--- a/src/FlaggingViewsData.php
+++ b/src/FlaggingViewsData.php
@@ -24,6 +24,33 @@ public function getViewsData() {
     // Remove the 'delete flagging' link that Views provides.
     unset($data['delete_flagging']);
 
+    // Flag counts.
+    $data['flag_counts']['table']['group'] = t('Flagging');
+    $data['flag_counts']['table']['join']['flagging'] = [
+      'left_field' => 'flag_id',
+      'field' => 'flag_id',
+      'extra' => [[
+        'left_field' => 'entity_id',
+        'field' => 'entity_id',
+      ]],
+    ];
+    $data['flag_counts']['count'] = [
+      'title' => $this->t('Flagging count'),
+      'help' => $this->t('The number of flaggings an entity has.'),
+      'field' => ['id' => 'numeric'],
+      'filter' => ['id' => 'numeric'],
+      'sort' => ['id' => 'standard'],
+      'argument' => ['id' => 'standard'],
+    ];
+    $data['flag_counts']['last_updated'] = [
+      'title' => $this->t('Last flagging'),
+      'help' => $this->t('Last time this entity has been flagged.'),
+      'field' => ['id' => 'field'],
+      'filter' => ['id' => 'date'],
+      'sort' => ['id' => 'date'],
+      'argument' => ['id' => 'date'],
+    ];
+
     // Flag link.
     $data['flagging']['link_flag'] = [
       'field' => [
