More robust error handling when the current repo count can't be found