– During the morning prayer we say two blessings before “Shma” and one blessing after it. And also we say two blessings before “Shma” and two blessings after it during the evening prayer. [Which in sum gives us seven blessings]. And the ending of the verse (“because of Your righteous judgments”) alludes to the reading of “Shma” which is taken from the Torah.
For more: see Rashi on Tehillim, 119:164.