{{ .page.Scratch.Add "numGalleries" 1}} {{ $i := .page.Scratch.Get "numGalleries" }} {{ $length := len .carousel }}