There are seven cases in Latvian. In general, each case correspond to the given ending of the word, but sometimes different cases have the same endings.
Sometimes, you may read that there are only six cases. This may be either because the vocative case was not counted, or the instrumental. The latter is more likely as its forms coincide with the forms of accusative in singular and those of dative in plural.