convert resultCount into int for calculation of drawMode