return count with /api/environments request