Count them by laying the wall out, not by dividing its length. Dividing tells you roughly how many layout studs there are; every door, window, corner and wall intersection then changes the count, and cripples and jacks come from somewhere too.
Layout studs. From the start end, the second stud's leading edge is at 15-1/4 inches, so its centre is on 16 and a 4 ft sheet starting at the wall end breaks on a stud. Then every 16 inches. A 12 ft wall has 10 studs this way: the two ends and eight between.
Doors and windows. The layout studs that fall in the opening come out. Each side gets a full-height king stud and a jack stud (two jacks for wider openings if your plans call for them) that carries the header. Above the header and under a window's rough sill, short cripples stay on the 16-inch layout so sheathing and drywall still land on wood.
Corners and intersections. Add backing studs where walls meet: typically two at a corner and two where an interior wall tees in, though framers differ.
A worked 12 ft wall with one window
A 12 ft wall, 8 ft precut studs (92-5/8"), 16 on center, with a 36" x 48" rough opening whose left edge is 4 ft from the start, header top at 82-1/2" and a 2x10 header:
Member
Count
Length
Studs (end and layout)
7
92-5/8"
King studs
2
92-5/8"
Jack studs
2
81"
Header plies (2x10)
2
39"
Rough sill
1
36"
Top cripples
3
2-3/8"
Bottom cripples
4
31-1/2"
Plates (bottom, top, cap)
3
144"
That is 9 full-height members against 10 for the same wall without a window, plus 13 shorter pieces. The jack is the header height less the 1-1/2" bottom plate; the header is the opening plus 1-1/2" for each jack; the top cripples fill 94-1/8" (top of the precut stud) less 82-1/2" less the 9-1/4" header. Those 2-3/8" cripples are why many framers use a 2x12 header at 82-1/2" in an 8 ft wall and leave out top cripples, a choice that is yours and your plans' to make.
One stud per foot, against a full layout
The rule of thumb is one stud per linear foot of wall. On the tool's example house (an invented 40 x 28 ft ranch, 211.5 ft of exterior and interior wall, 6 windows, 6 doors), that rule says about 212 studs. Laid out at 16 on center, the house has 179 full-height members (131 studs, 24 kings, 8 corner and 16 tee backing studs), 28 jacks and 57 cripples. The optimised order covers them with 178 precut studs plus longer boards that the plates, headers, jacks and cripples are also cut from. At 24 on center the same house drops to 89 layout studs and 41 cripples, and about 14% less board length, if your design and code allow that spacing for those walls.
One house is not a rule. The point is that the per-foot allowance and the real count can differ by tens of studs either way, and a layout tells you which way.