added try catch block in setviewscount method for  number format exception