function for getting overall activities amount