Controlling the amount of rows in the database is a bit more tricky because you cannot do it using a simple constraint. Constraints work only on row level, for example like
NOT NULL
constraint.
However, using T-SQL programming and a trigger you can enforce the business logic you want, even for a set of rows. For an example you might want to read
Control maximum number of rows in a table[
^]