Count records and display in html page

Count records and display in html page

Is there a simple way to display the number of records from a certain form/table into a html page?

Eg table Contacts:

var x = number of records in Contacts
<h1>Currently x records in Contacts</h1>

Thanks for any tips