handle the case that the queried row is not existed
rowCount function causes a exception, using count instead