I'm not going to ask why, I probably won't like the reason you give me. However you're not counting days here. You are counting session starts.
What you really want to do is something like this:
public class Global : System.Web.HttpApplication
{
private static DateTime started;
private static int days;
protected void Application_Start(object sender, EventArgs e)
{
started = DateTime.UtcNow;
days = 0;
}
protected void Session_Start(object sender, EventArgs e)
{
TimeSpan ts = DateTime.UtcNow - started;
days = (int)ts.TotalDays;
}
...
}
}
However, that's assuming the session events fire and you're also overlooking the fact the applications can and do get unloaded, your application may not stay loaded even a single day.
Your link points to counting the number of website visits which isn't the same as counting days or getting how long the web server has been running. It is also a very poor attempt because it does not take into account repeat visits from the same user etc and is not really persistent across app domain unloads.