added get row count function