Your question is a bit unclear but I think what you are trying to achieve is to get counts of the items in your collection grouped not by exact dates but rather by parts of the date. So for example your first requirement is "to show only month and year" meaning you want to divide your items into bags labelled after each month + year and get count in each of the bags.
This means that you will need to group by more than one thing. Not the whole date but multiple properties within the date. See the example for Month + Year, I'm sure you'll be able to figure out the rest. You can also refer to this answer: C# Linq Group By on multiple columns
var list = new List<DateTime>
{
new DateTime(2014, 2, 1),
new DateTime(2014, 2, 13),
new DateTime(2014, 2, 22),
new DateTime(2014, 4, 1),
new DateTime(2014, 4, 3),
new DateTime(2014, 7, 1),
new DateTime(2014, 7, 6),
new DateTime(2014, 7, 6),
new DateTime(2015, 2, 1),
new DateTime(2015, 2, 1),
new DateTime(2015, 4, 2),
new DateTime(2015, 4, 1),
new DateTime(2015, 4, 1),
};
var myList = (from p in list
group p by new {p.Month, p.Year} into g
orderby g.Key.Year, g.Key.Month
select new
{
Year = g.Key.Year,
Month = g.Key.Month,
Count = g.Count()
}
).Take(10).ToList();
foreach (var item in myList)
{
Console.WriteLine("Year: {0}, Month: {1}, Count {2}", item.Year, item.Month, item.Count);
}
Console.ReadKey();