Added "stats" method to return statistics for a given resource.