Unless you deliberately increase the number of stitches in a pattern, you should have the same number all the way up the scarf.
Beginners almost always have this problem. If you're doing a knit/purl pattern, then the culprit is usually not putting the yarn in the proper place for that particular stitch--front for purl, back for knit.
Sometimes a person will see that loose first stitch as two and knit into it incorrectly. Another thing that sometimes happens is that at the beginning of a row, the yarn gets wrapped around the right needle while doing the first stitch and that, too, will give you an extra one.
There's also the problem that a stitch from the previous row might not have been slid completely off the needle, and the extra loop gets knit into.
I know all these things because at one time in my life I've done them. As have most knitters.
As you get more experience and can recognize what it is you're actually doing with these sticks and string, you'll get better at it. You can use stitch markers every 10 stitches or so and count as you get to each to narrow down where a mistake may have occurred. You won't have to do this forever, though, trust me.
Good luck with it, and welcome to the Forum.