Added option to show a loading spinner for buttons that show a count