For a cell to be open in the morning, it must be visited an odd number of times. This only occurs for cells whose number is a square number.

That is for cells 1,4,9,16,25,36,49,64,81,100

So the answer is 10

For 1,000,000 cells the answer is 1000 since 1000 is the square root of 1,000,000