How to count the number of dates in a dateTime list
<p>I have an MVC project. I have a list of dates of when a <code>username</code> was created. The list is of type <code>DateTime</code>.</p>

<p>Now, I want to show how many <code>usernames</code> was created within the past 12 months.</p>

<p>I'm trying to show this in the <code>ViewModel</code>. I can count how many there are by doing something like</p>

<pre><code>@{ int NumofUserNames = Model.SomethingHere.Count;
}
</code></pre>

<p>But this counts <strong>ALL</strong> of the items. How do I write it to show the dates within this year (past 365 days)</p>

<p>In c#</p>

<p><strong>Update</strong>: The view will show how many users created in the past 12 months so I meant in the past 365 from the point the user is viewing it.</p>