Counting your cast definitely helps and you get into a rythm while fishing and then it's easy.
Marking light line is easy with a marker pen, the one with the pump in the back works the best but your line must be out for at least 5-10min so the marker ink can dry otherwise when retrieving it marks a lot of line below and above it causing a smudge
For darker lines there is a white line marker that I last saw sold at Fear None (Bank Angler Offices) we use it in feeder and Waggler fishing on brown or black sinking nyons.
I personally count my casts and then to get absolute accuracy clip my lines at the distance I'm getting fish, if I break off or have to clip out for a big fish I re-cast to the specific count mark and if I am comfortable with the rythm of the cast I clip it or if unsure wait to see if the fish bite within the average waiting period and cli the line before retrieving.