The objective of lap counting is to ensure that all swimmers complete the required number of laps. The most common way to do this is to have a designated person, typically one of the starters, record the order of finish for each lap of the race.
A typical counter sheet has one line for each lap in the race. As the swimmer finishes the lap, their lane number is written on the line for that lap.
For the first lap or two, the swimmers will be fairly close together. Don't worry about the exact order of swimmers on these first laps. The objective is just to make sure they all complete the required number of laps. As the race continues, the swimmers will spread out, making the order more obvious and easier to write down.
The order of the swimmers will be fairly stable after the first couple of laps.
Once lapping starts, you will need to be more careful about the order of finish, ensuring that you are placing the count on the correct line. Every line should eventually have all the lanes listed.
Make sure the bell is rung for the last lap. Ideally by a (non-counting) starter or the referee. The swimmer is ultimately responsible for completing the required number of laps.
At the end of the race, you will have a fully completed counter sheet, with the line for the last lap being the overall race order of finish.