How to count records that meet criteria and show in HTML View?

How to count records that meet criteria and show in HTML View?

I have an HTML view that acts as a home page for an app.  On it, I want to show some usage metrics for the app:

- # Available Items
- # Expired Items
- # Items Added in last 30 days from today

Example:

"43 Available Items      16 Expired Items     10 Added in Last 30 Days"

How can I count these records On Load and display them in the HTML View?

Will this slow the view down as more records are added to the app?