# count the people of Israel ... that I may know their number

It is apparent from 1 Chronicles 21:5 that David wanted to count only the men who were able to fight.

# from Beersheba to Dan

The Israelites considered these two cities their most southern and most northern cities. David uses these cities to refer to all of Israel.