Update rowCount to work with cache