the problem is that you have X records per student, and you cannot have a computed column see at another table.
I would suggest you create a regular column in the table, and keep that updated with triggers on the other table, so that when there are 3 records in a row as indicated, that additional column gets changed from 0 to 1, for example (or back, if there are no longer 3 records in a row ...) and have your computed column look at that column ...