Count the number of content flagged by logged in user
This work for me in normal block (no in views):

&lt;?php
global $user;
$uid = $user-&gt;uid; //Logged in user ID
$result = db_query("SELECT COUNT(*) FROM flagging WHERE uid=:uid and fid=2", array(':uid' =&gt; $uid))-&gt;fetchField(); //fid = ID your flag
print $result ." flagged items";
?&gt;