return rowcount in compare endpoint