Sure, just make sure to properly encode it. For example you could JSON encode the entire model itself:
@model IEnumerable
or:
alert(model[2].Foo.Bar);
or whatever.
But if you only care about the number of elements inside the model (if this model represents a collection):
var count = @Html.Raw(Json.Encode(Model.Count()));
alert(count);