How long do cooked potatoes last on counter?

Cooked potatoes last as long as you want. The problem is that they will get more bacteria over time