count total resources