You dont say where your data set of results are. This will affect the formula you create.

Assuming that your data set is in columns H to L and in drawn order ( there would be no point in counting otherwise) , starting at row 2 downwards,and assuming your data has less than 4000 rows:-

in cell B2 you need the formula =COUNTIF(H$2:H$4000,$A2).

In the formula H$2 anchors the top left cornerof the range being counted to that cell, so that copying the formula along and down will not move that reference cell. $A2 does the same thing, anchoring what is being counted to column 1 even if you copy the formula across the row. Note that you need to modify H$4000 if you have more rows of data than 4000 of if you have some other data below and within counting range, or if the top left of your data is not in column H.

The formula looks down column B and counts ocurrences of the item in A2 which is a 1. Copy that formula along the row to column F. This row now counts ocurrences of number 1 in each position. Copy that row of 5 formulas down to row 40, and the grid now counts all 39 numbers in each of the positions. If you want a checksum, the sum of all these counts... in cell G1, formula := =SUM(B2:F40) should equal (number of draws x 5). My test data has 200 draws, so this check sum is correct.

I hope this is what you were looking for.