Count the number of content flagged by logged in user I want to get the number of items (content) flagged by the logged in user. 

&lt;?php
  $flag = flag_get_flag('flag1');
  print $flag-&gt;get_count($nid);
?&gt;


The above line would display the total number of times that content is flagged. How can i get number of items flagged by the logged in user. Lets say user A has flagged Content 1, Content2 and Content 3. Then the output needed is something as:

Number of Items flagged by [current:user]: 3

Thanks
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;