The whole body of this else clause is a simple if; turn it into a simple else if (count > 0) { ... } with one less layer of indentation !