Through this code, you can get click count on a button.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Button</title>
<link rel="stylesheet" type="text/css" href="css/button.css">
</head>
<body>
<script src="js/button.js" type="text/javascript"></script>
<button id="btn" class="btnst" onclick="myFunction()">0</button>
</body>
</html>
----------JAVASCRIPT----------
let count = 0;
function myFunction() {
count+=1;
document.getElementById("btn").innerHTML = count;
}