I have columns for names and one for each period
If you have placed your 'periods' into fields, that is spreadsheet thinking and will not serve you well overall. If you had periods in rows as records, calculations would usually be much easier, not to mention following normalization guidelines.
It has been suggested that you "do an aggregate count of records" but I interpret your initial post to mean that you've placed what ought to be in records into fields instead.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.