If you've got a database, use that. Set up a table that has these fields - id, username, password, clicks
Create your login page, I would suggest using sessions to check a person is logged in. When they're logged in, everytime they click the button, add 1 to their personal count. To get the total count, just add up all the clicks from everyone in the database.
Hope that helps,
Matt 🙂