Task
As input you have:
- a positive integer
N
And you should output:
- The number of integers in \$[1,N]\$ (an inclusive range) which end with the digit \$2\$ in base ten.
Test cases
1 -> 0
2 -> 1
5 -> 1
10 -> 1
12 -> 2
20 -> 2
30 -> 3
54 -> 6
97 -> 10
100 -> 10
Rules
It is a code-golf so the lowest score in bytes wins!