how to count click tab menu and insert to database

You can do it with AJAX – for each .tab-content, send via AJAX the ID (for example #tab-content-3). Now on the server receive the id and have a table of ids and add 1 each time.

Here you can find and update increment command – make sure to use something like this and not reading from DB and then updating, because this is not atomic and other users can “update” your tab count in between:
https://stackoverflow.com/questions/2259155/increment-value-in-mysql-update-query

A better approach though would be using Google Analytics. Assign an even to the tabs, and then you can view it all in GA – better than reinventing the wheel I guess (only if you don’t need the info back on the website, but just to have statistical information of course)