In this case,we have to use
Range and Criteria are same,hence Formula actually is
=SUMPRODUCT(1/COUNTIF(SELECT RANGE,SELECT RANGE))
Download file and tryView Answer
For Question 1: To Calculate how many subjects.
We can make a pivot table and count the subjects.
We can use countif and sumproduct formula