Unit 1 (v. 8a): God counts the speaker’s unsettled movements
The speaker says God “numbers” his wanderings—his repeated displacements and restless life on the run. The point is not that God merely sees it once, but that God keeps track of it in detail.
Unit 2 (v. 8b–c): God preserves and records the speaker’s grief
He pictures God putting his tears into a bottle, as if each one is gathered and kept. Then he asks, “Aren’t they in your book?” expecting the answer “yes”: God has written them down, so they are not overlooked.
Unit 3 (v. 9a): Prayer is the turning point for the conflict
The speaker expects that “then”—as a result of God’s attentive care—his enemies will “turn back” on the day he calls. The timing matters: when he prays, he anticipates an immediate shift in the enemies’ advance.
Unit 4 (v. 9b): The speaker’s confidence rests on God’s stance toward him
He concludes, “I know this, that God is for me.” This is the ground of his expectation: because God is aligned with him, the enemies’ pressure will not be the last word.