added total rows getter
make it possible to handle 0 total rows