Put count as 1 when there is an error dialog.