cshtml set a max value foreach

HTML
@foreach (ViewModel variable in Model.Take(value))
Source

Also in HTML: