There are twenty consonants (B, C, D, F, G, H, J, L, M, N, Ñ, P, Q, R, S, T, V, X, Y and Z) and two more (K and W, are used in a few words, often foreign) and, additionally, there are five diagraphs (two letters together representing a sounds: ch, ll, rr, gu and qu). That makes 27 graphs, but only 17 to 19 consonant phonemes (depending on the spoken variety).
1* Letter C represents three sounds: /k/ before a, o & u, and /s/ before e & i, but in some varieties /θ/. Similarly letter Z is /s/ but in those varieties is /θ/.
2* Letter G represents two sounds: /g/ before a, o & u, and /x/ before e & i.
3* Letter R represents two sounds: Between vowels is /ɾ/ otherwise /r/.
More maps about the Spanish language