Storing an integer counter in indexer
I suggest the following:

public class ErrorController : Controller
{
    private const string RedirectLoopCounterName = "RedirectLoopCounter";
    private const int MaxRedirectLoopCount = 1;

    private int RedirectLoopCounter
    {
        get { return ((int?)TempData.Peek(RedirectLoopCounterName)) ?? 0; }
        set { TempData[RedirectLoopCounterName] = value; }
    }

    private int IncreaseRedirectLoopCounter() 
    {
        return ++RedirectLoopCounter;
    }

    [ActionName("500")]
    public ActionResult InternalServerError(string aspxerrorpath = null)
    {       
        var isRedirectLoop = IncreaseRedirectLoopCounter() &gt; MaxRedirectLoopCount;
        if(isRedirectLoop)
        {
            return Redirect("/GeneralError.htm");
        }

        // Check if user is admin or running locally and display error if so
    }
}



Create a constant for the counter's name as already mentioned by @BCdotWEB
Create a property for getting and setting its value
Create a method for actually increasing the counters value
Additionaly you could replace the 1 by a constant
Finally you can replace the condition by a helper variable to document it better
I would also invert the if