Only count visible objects.