You have a number of horse races, and each race allows horses of a certain age or younger to compete. You need to find out how many races a horse of a specific age can enter.
Input: [3, 1, 4, 1, 5], 4
[3, 1, 4, 1, 5], 4
Output: 2
2
Input: [1], 100
[1], 100
Output: 0
0