I have to smile as this problem is a lot more common than you think. for racers the problem is often called "circle swimming" where a racer goes down on side of a lane then slides over to the other side for the return trip adding distance to their race. Your problem is not the same but I sense its not the root cause of your different stroke counts. unless you count after a specific number of lengths using a consistent turn style, the problem may be that your pushing off and gliding different lengths from the wall with each length. I can make my count vary from 12 to 17 depending on how I push off, how far I reach and how fast my pace is, so the count is also relative to those factors. Try some variations like counting 2 or 4 lengths of the pool and doing an average. That will also eliminate reach/pace and push off variations. As to swimming straight, bilateral breathing and perhaps peeking ahead every 3-4 strokes at some reference will help.