I don't quite understand why the amount of rows should be limited but you can write a trigger that checks the amount of existing rows in a table and then generate an error if the amount is too big. This would prevent from adding rows.
For SQL Server for example see
CREATE TRIGGER[
^]