Add CountRows method