how to conclude the facebook shares, likes, comments on the profile of user in php

I have create a contest site. in which user register and then I am showing the users in a page and also set a detail page for the user. and on the detail page there are facebook and twitter share and like buttons and facebook comments box. mean anyone can comment on the user profile, share it on facebook, share it on twitter and like a user profile using facebook like button. now I want to conclude the result that each user gets how much facebook likes, comments, share and how much twitter shares. and also sum these results to nominate a user to be winner. my question is that how can I do this in php. and if yes then how ? and is there any tutorial about it that helps me in learning.

thanks in advance.