getting button count