Blank cells count towards the limit if they are within the range of non blank cells. The calculation is done by multiplying the number of the last row with data by the number of the last column with data
for example:
+----+---+---+---+
| | A | B | C |
+----+---+---+---+
| 1 | x | | |
| 2 | | | |
| 3 | | | |
| 4 | | x | |
| 5 | x | | |
| 6 | | | x |
| 7 | x | | |
| 8 | | | |
| 9 | | | |
| 10 | x | | |
+----+---+---+---+
Although there are a lot of blank cells, and no more than once cell filled per row, the total cells calculation is 10 x 3 = 30
It is possible that non-visible characters are present in your spreadsheet (especially as your sheet was generated rather than manually created).
In a case such as the one below (if there is a space in the cell D4), there is no visual indicator of the final row.
+---+---+---+---+---+
| | A | B | C | D |
+---+---+---+---+---+
| 1 | x | | | |
| 2 | x | | | |
| 3 | | x | | |
| 4 | | | | |
+---+---+---+---+---+
To find out for sure what your 'end' cell is, put the focus on A1, then use Ctrl+Shift+End and the focus will move to the cell that is in the final row and the final column.
To remove any unwanted cells, select the first unwanted column, press Ctrl+Shift+Right arrow, then right-click and choose delete. Do a similar procedure to delete unwanted rows.