Use the below SQL to get the count of the questions favorited by all the users .
Where entityid the question_id (post_id) from the database .
After grabing the value use it anyway you want .
SELECT COUNT(*) as count
WHERE `entitytype` = 'Q'
AND `entityid` =10
LIMIT 0 , 300
Hope this helps . Thanks