Find the number of integers in the range from 1 to N that ends with 2
Python 2, 17 bytes



lambda n:(n+8)/10


Try it online! Uses Python 2's integer division. In Python 3 would be a byte longer with lambda n:(n+8)//10.