One way is to put a counter on students. When a line is added to applications, increasing it, when a line is deleted, reduce it. Doing this with triggers is very simple.
Then set the limit for students so that the counter should be <= 3.
source share