Cleaned up C API for rowCounts()