SUMPRODUCT(...)

Category: Math and trigonometry

Returns the sum of the products of corresponding array components

SUMPRODUCT(array1, [array2], [array3], ...)

Category: Math and trigonometry

Returns the remainder from division

MOD(number, divisor)

Category: Lookup and reference

Returns the row number of a reference

ROW([reference])

Category: Lookup and reference

Returns a reference indicated by a text value

INDIRECT(ref_text, [a1])

0

The formula used MOD to find if the division has remainder of zero, that is only condition for being perfectly divisble. If the condition is meet, the number is multiplied with 1 and then summed up with SUMPRODUCT to give the final count.