The code is written to control 24 sensors arranged as 12 pairs. Accordingly, the components list has 24 IR sensors. If you don't want/need the full complement, just don't connect them. The code will still run fine, it will just give readings of 0 for any unconnected sensors.
The code is set to tally beam breaks every 10 seconds, then upload them and reset the counter. This means your .csv data file will have a new row of time-stamped beam breaks tallies every 10 seconds. If you want to change the timing, it needs to be done in the Arduino code. Go to the bit that says "if(t - previousT >= 10)" and modify the 10 to whatever time bin (in seconds) you want.
Performing experiments like this, you will often find the mice are uncooperative and push their tubes/bedding in the way of the sensors. Historically, we would therefore have to remove the bedding from the cages, which is not good for the animal welfare. A good workaround for this is to buy the same neodymium magnets on the components list and use them to pin the tube/bedding out of the way. This lets the animals keep their bedding while having a very small chance of interfering with the sensors.