I have a screen with our orders on it and I want to show some counts for quick and easy reporting.

I have worked out that I can get a count of all orders by doing

```
<%= Order.count(:all) %>

```

I would also like to show some counts from specific date ranges, for example 'today', 'yesterday', 'this week', 'this month', 'last month, 'this year' etc.

I'm very new to rails, having recently made the leap from PHP so I'm still getting used to the Rails way of doing things. We're using Rails 3 and ActiveRecord to query the DB. What would be the best way to go about achieving this? 

Thanks!