Given an array of integers and two values lower and upper, count how many elements are at least lower and at most upper.